Subject: Re: shell script question (grep)
To: Giorgos Keramidas <keramida@ceid.upatras.gr>
From: Lubos Vrbka <shnek@chemi.muni.cz>
List: netbsd-help
Date: 02/11/2003 19:34:13
hi,

> You could force sed to treat $i and $j as full "words" by adding
> \<...\> around them in the substitution pattern.  Seeing how you pass
> $i as the last part of a line, you don't need the \> part either, and
> that would make the script:
>
> sed -e "s/\\<$i\$/$j/" < file1 > file1.out
why is there a double backslash in the beginning? does the "full word" mean
that it has to be separated by some white character from both sides (or, in
this case, by space from left and EOLN (\$) from right)?
how could i include a dollar sign to the string specification so it is no
more control character? \\$ ?

regards,
lubos

-
#################################################
Lubos Vrbka
National Centre for Biomolecular Research
Masaryk university, Brno, Czech Republic

shnek@chemi.muni.cz
http://www.chemi.muni.cz/~shnek
tel. +420 541 129 508
#################################################