[sclug] script or alias to page directory listings
David Given
dg at cowlark.com
Mon Sep 5 12:56:33 UTC 2005
On Monday 05 September 2005 12:37, John Stumbles wrote:
[...]
> Can anyone suggest how to do this (either as a script or a bash command
> alias)?
Use "$@":
myls() {
ls "$@" | more
}
It's a special, magic, l33t monkey ninja special case shell expansion that's
equivalent to "$1" "$2" ..., and if there aren't any arguments it expands
into nothing.
There's no reason at all why you should know this unless you've spent far too
much type groping through the sh man page. sh annoys me.
--
+- David Given --McQ-+
| dg at cowlark.com | "The README of fate is a complex program indeed."
| (dg at tao-group.com) | --- Reboot
+- www.cowlark.com --+
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.tmdg.co.uk/pipermail/sclug/attachments/20050905/6472c6c9/attachment.bin
More information about the Sclug
mailing list