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



-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/1300470364.2932.5.ca...@squeeje.critical.pt

Reply via email to