Mailing List ArchiveSupport open source code!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]Re: symlink destination
- To: tlug@example.com
- Subject: Re: symlink destination
- From: Tod McQuillin <devin@example.com>
- Date: Wed, 25 Oct 2000 01:49:09 -0500 (CDT)
- Content-Type: TEXT/PLAIN; charset=US-ASCII
- In-Reply-To: <14838.29947.837620.510820@example.com>
- Reply-To: tlug@example.com
- Resent-From: tlug@example.com
- Resent-Message-ID: <nYhkgB.A.ko.AYo95@example.com>
- Resent-Sender: tlug-request@example.com
On Wed, 25 Oct 2000, Viktor Pavlenko wrote: > Is there a way to find out the destination of a symbolic link (the > file it links to) from a sh script? Parsing the output of `ls -l' is a > possibility but it doesn't feel right. #!/bin/sh file=/path/to/file dest=`perl -e "print readlink(\"$file\");"` (Actually this is a subtle hint that perl makes this kind of scripting easier... but it will work in a shell script if you have perl around.) -- Tod McQuillin
- Follow-Ups:
- Re: symlink destination
- From: Viktor Pavlenko <vp@example.com>
- References:
- symlink destination
- From: Viktor Pavlenko <vp@example.com>
Home | Main Index | Thread Index
- Prev by Date: Re: nohup
- Next by Date: Re: symlink destination
- Prev by thread: Re: symlink destination
- Next by thread: Re: symlink destination
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links