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