need help with sed problem
Hello all
I need to use sed to replace a given line in a text file with the
current working directory. But this is getting quite tricky. Problem
ilustrated below:
====================================
$ cat text.txt
aaaa
bbbb:/some/wrong/path/
cccc
$ sed s/bbbb.*/bbbb:$TERM/ text.txt
aaaa
bbbb:xterm
cccc
jmf@squeeje:~$ sed s/bbbb.*/bbbb:$PWD/ text.txt
sed: -e expression #1, char 16: unknown option to `s'
=====================================
I'd like to have
====================================
aaaa
bbbb:/home/myself
cccc
====================================
Can anyone help ? thanks in advance.
Joao
Reply to: