Re: ls -l format changed ?
On Mon, Jul 01, 2002 at 01:19:58PM +0000, Miquel van Smoorenburg wrote:
> >Unfortunately it is debian-specific.
> >awk '{print($11)}' was protable across many systems until today.
Nope.
12:23am glenn@zewt.pts/5 [/tmp/files] /bin/ls -l
total 0
lrwxr-xr-x 1 glenn users 11 Jul 3 00:22 goodbye world -> hello world
12:23am glenn@zewt.pts/5 [/tmp/files] /bin/ls -l "goodbye world" | awk '{print($11)}'
->
> ls -l xxx | sed -ne 's/^.* -> //p'
12:25am glenn@zewt.pts/5 [/tmp/files] /bin/ls -l
total 0
lrwxr-xr-x 1 glenn users 16 Jul 3 00:25 stuff -> -> otherplace <-
12:25am glenn@zewt.pts/5 [/tmp/files] /bin/ls -l stuff | sed -ne 's/^.* -> //p'
otherplace <-
Perl. Parsing stuff like this is error-prone. The change in ls's format
is ugly, of course, but don't complain about it breaking scripts that
were due to break. :)
--
Glenn Maynard
--
To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Reply to: