quoting $ in the Csh

Doug Schmidt schmidt at siam.ics.uci.edu
Wed Dec 14 08:30:07 AEST 1988


I'd like to thank everyone who responded to my question about quoting
'$' in the csh.  The following is a brief summary of all the
different, valid responses from various folks ( the original problem
was to create an alias that would replace all blank lines from a file
with *no* blank lines ).

----------------------------------------
alias sqz "grep -v '^[ ^I]*"\$\'
----------------------------------------
alias sqz grep -v \'^\[\ \^I\]\*\$\'
----------------------------------------
alias sqz "grep -v '^[ ^I]*"\$"'"
----------------------------------------
alias sqz "grep -v '"'^[ ^I]*$'"'"
----------------------------------------
alias sqz 'grep -v \'^[ ^I]*$\''
----------------------------------------
alias sqz "grep -v '^[ ^I]*"'$'"'"
----------------------------------------
alias sqz 'grep -v '\''^[ ^I]*$'\'
----------------------------------------
set d='$'
alias sqz "grep -v '^[ ^I]*$d' \!*"
----------------------------------------

Rather diverse approaches, eh? ;-)

thanks again.

Doug Schmidt
--
schmidt at ics.uci.edu (ARPA) |   Per me si va nella citta' dolente.
                           |   Per me si va nell'eterno dolore.
                           |   Per me si va tra la perduta gente.
                           |   Lasciate ogni speranza o voi ch'entrate.



More information about the Comp.unix.questions mailing list