Shell을 이용하여 cmd에서 DBMS에 접근하여 txt 파일로 추출하는 방법

$mysql -u root -p -h hostname -e "select * from table_name;" | sed 's/\t","/g;s/^/"/;s/$/"/;' > dbms.txt

+ Recent posts