2009-09-05 3 views
0

이 echo의 출력은 pipe를 사용하여 다음 명령으로 전달되지 않습니다.깨진 파이프와 티?

echo 'set foreign_key_checks = 0; truncate table saurabh.bus_services;' | 
mysqldump --compact --no-create-info -h192.168.950.180 -uroot -p live pnlbus | 
more 

집합 및 truncate 명령 다음에 덤프 출력이 필요합니다.

답변

3
(echo 'set foreign_key_checks = 0; truncate table saurabh.bus_services;' ; mysqldump --compact --no-create-info -h192.168.150.80 -uroot -p live pnlbus) | more 
0

지금 바로 set foreign_key_checks = 0; truncate table saurabh.bus_services;mysqldump 명령에 보내고 있습니다. 나는 이것이 당신이하고자하는 것이 아니라고 생각합니다.

'mysqldump는이'데이터를 임의의 SQL을 실행할뿐만 아니라 덤프] 명령 하는가

echo 'set foreign_key_checks = 0; truncate table saurabh.bus_services;' > output.tmp 
mysqldump --compact --no-create-info -h192.168.150.80 -uroot -p live pnlbus >> output.tmp 
more output.tmp 
0

뭔가를 시도?

나는 mysqldump가 아니라 'set'과 'truncate'명령을 'mysql'에 echo 할 필요가 없다고 생각한다.