bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ls: add a switch not to strip the directory we gave


From: Dan Jacobson
Subject: Re: ls: add a switch not to strip the directory we gave
Date: Wed, 14 May 2003 09:31:18 +0800
User-agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.2 (i386-pc-linux-gnu)

The following message is a courtesy copy of an article
that has been posted to comp.unix.shell as well.

Paul> Dan, if you don't want to type all that each time you want to do this,
Paul> then save the commands in a script.
Paul> #!/bin/sh -e
Paul> base=`ls -t "$1" | sed q`
Paul> echo "$1/$base"

Here's my proposal for the new option to ls:

-P --path-given
   Don't strip directories.
e.g.
$ ls -P dir
dir/file1 dir/file2

I mean if you look at all the multitude of things that the current
options to ls do, my proposal is quite conservative, merely asking it
to please not "helpfully strip what was given to it".
-- 
http://jidanni.org/ Taiwan(04)25854780




reply via email to

[Prev in Thread] Current Thread [Next in Thread]