[SOLVED] > | bash help from expert
Posted: Fri Apr 10, 2015 9:53 am
the following does not pipe correctly
this one prints correctly to the terminal
It works in 2 steps:
I am stuck
any help from the "real" UNIX guys?
Karl
(*) the outF1 has to go before the 2>&1 .. learned that one.
good read : http://www.catonmat.net/download/bash-redirections-cheat-sheet.pdf
- Code: Select all
psql -U userid database < inputFile 2>&1 | grep -v notWantedText > outputFile
this one prints correctly to the terminal
- Code: Select all
psql -U userid database < inputFile 2>&1 | grep -v notWantedText
It works in 2 steps:
- Code: Select all
psql -U userid database < inputFile > outF1 2>&1 (*)
cat outF1 | grep -v notWantedText > outputFile
I am stuck
any help from the "real" UNIX guys?
Karl
(*) the outF1 has to go before the 2>&1 .. learned that one.
good read : http://www.catonmat.net/download/bash-redirections-cheat-sheet.pdf