Extracting the linked to file name
Anthony Wesley
Anthony.Wesley at prometheus.com.au
Wed Nov 14 12:22:52 EST 2001
Martijn van Oosterhout wrote:
>
> Everyone is trying far too hard!
>
> On Wed, Nov 14, 2001 at 10:46:48AM +1100, Rasjid Wilcox wrote:
> > 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\|`
>
> How about:
>
> filename=`readlink symlink.name`
$ filename=`readlink symlink.name`
bash: readlink: command not found
??
More information about the linux
mailing list