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
On Nov 16, 2007 5:20 PM, John Homer H Alvero <[EMAIL PROTECTED]> wrote: > ls -l FILE* | cut -d " " -f10 > NEWFILE > > :p > > > On Nov 16, 2007 5:12 PM, Michael Tinsay <[EMAIL PROTECTED]> wrote: > > > > Hello script gurus, > > > > Suppose I have a text file with the content: > > > > FILE0 > > FILE1 > > FILE2 > > > > > > Then I have three symlinks in my homedir: > > > > FILE0 -> /foo/bar > > FILE1 -> /foobar > > FILE2 -> /fubar > > > > > > What's a good way to replace the contents of the text file (FILE0, FILE1, > > and FILE2) with the corresponding symlinked files (/foo/bar, /foobar, /fubar > > respectively)? > > > > TIA. > > > > > > --- mike t. > > > > _________________________________________________ > > 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 > > > _________________________________________________ > 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 > _________________________________________________ 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

