[sclug] script or alias to page directory listings

John Stumbles john at stumbles.org.uk
Mon Sep 5 11:40:44 UTC 2005


In Ye Olde Days before GUIs[1] I used to have a script (called lsl) 
which did
ls -al --color $* | more

This was convenient, but breaks when filenames have spaces in them[2]. 
Putting "" quotes around the $* works for single filenames but messes up 
with wildcards or without an argument.

Can anyone suggest how to do this (either as a script or a bash command 
alias)?




[1] well, before I used a GUI on *n*x

[2] OK that's not directly the fault of GUIs, but it becomes much easier 
to generate filenames containing spaces in a GUI.

-- 
John Stumbles


More information about the Sclug mailing list