stat(1) badly needs flag to just print name of the symlink

2008-09-16 Thread jidanni
Is it true that there is no stat(1) flag to just print the link name?
All one can find is
%N - Quoted file name with dereference if symbolic link
$ stat -c %N s1mp3.backup
`s1mp3.backup' -> `/mnt/extra10/s1mp3'
meaning the user must be dragged over the coals to do
$ stat -c %N s1mp3.backup |perl -F\'\|\` -anwle '{print $F[3]}'
/mnt/extra10/s1mp3
or
$ perl -wle 'print readlink($ARGV[0])' s1mp3.backup
/mnt/extra10/s1mp3
(P.S., I'm not talking about -L, --dereference.)


___
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils


Re: stat(1) badly needs flag to just print name of the symlink

2008-09-16 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

According to [EMAIL PROTECTED] on 9/16/2008 2:05 PM:
> Is it true that there is no stat(1) flag to just print the link name?

What's wrong with readlink(1)?

- --
Don't work too hard, make some time for fun as well!

Eric Blake [EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkjQQwEACgkQ84KuGfSFAYCzEgCcDWCuREilPWftXVr0Ar6x51+l
5Y4AoIVrEl+YCZa50hTk9QZFK7mnsmY5
=nDZM
-END PGP SIGNATURE-


___
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils


Re: stat(1) badly needs flag to just print name of the symlink

2008-09-16 Thread jidanni
EB> What's wrong with readlink(1)?
OK, I will let you off the hook if you enhance the stat(1) man page to
please say something like:
   %N Quoted file name with dereference if symbolic link
  For just the dereference name, see readlink(1).


___
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils