[D-community-offtopic] how to quote the pipe symbol in shell scripts?

Amaya amaya at debian.org
Wed May 25 11:25:18 UTC 2011


Kamaraju S Kusumanchi wrote:
> command="tail -n 3 cols.txt | cut -f 2-3 -d ','"
> [...]
> It looks like the pipe symbol is being embedded in single quotes. But
> I do not know how to suppress this behaviour. Any
> ideas/comments/suggestions?

To me it looks like it is not the pipe giving you grief. It is the
single quotes from the cut command that are failing (-d ','). 

I am running into the same issue atm (long time, no quotes) and am
looking at: http://wiki.bash-hackers.org/syntax/quoting 

Happy hacking and *do* come back with an answer if you finally fix this.
I for sure will :)

-- 
 .''`.     #yeswecamp #spanishrevolution 
: :' :    
`. `'   
  `-    Proudly running Debian GNU/Linux



More information about the D-community-offtopic mailing list