Extracting the linked to file name

Rasjid Wilcox rasjidw at austethical.com.au
Wed Nov 14 10:46:48 EST 2001


I have almost finished my Vet Autodownloader script.

I have one more thing to resolve.  I need to extract the name of the file that a
symbolic link points to.  Can anyone suggest a better way than

filename=`ll symlink.name | sed s/"->"/\|/ | cut -f 2 -d\|`

as this relies on choosing a character (| in this instance) which you believe
(and hope) is not in the symlink name.

Rasjid.






More information about the linux mailing list