How do I escape the /'s? readlink will return /foo/bar and I need to pass it to sed as \/foo\/bar, or else sed will fail and return nothing.
--- mike t. ----- Original Message ---- From: Eduardo Tongson <[EMAIL PROTECTED]> To: Philippine Linux Users' Group (PLUG) Technical Discussion List <[email protected]> Sent: Friday, November 16, 2007 5:25:08 PM Subject: Re: [plug] scripting question You need to look at the text file first. for i in `cat test.txt`; do sed -i s/$i/`readlink $i`/ test.txt ; done
_________________________________________________ Philippine Linux Users' Group (PLUG) Mailing List [email protected] (#PLUG @ irc.free.net.ph) Read the Guidelines: http://linux.org.ph/lists Searchable Archives: http://archives.free.net.ph

