LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   simple bash scripting help (http://www.linuxquestions.org/questions/linux-general-1/simple-bash-scripting-help-719990/)

ArfaSmif 04-18-2009 03:49 AM

simple bash scripting help
 
Back in the good old days, before *nix allowed file or directory names with spaces as part of the name I could create a script for example, called "lm" , put it in my bin directory, and execute it as such :-

ll T* W*

and the output would be exactly the same as if I had typed in:-

ls -al T* W* | more

Maybe I'm getting too old or too lazy, but after reading the "Bash Scripting Guide" pdf from tldp.org, I still can't for the life of me work out how to do this. Can any of you young whipper snappers out there show me the way please?

carltm 04-18-2009 05:18 AM

I'm guessing that the "ll" should be "lm". Otherwise I can't make
sense of your post.

The lm script just needs this:

ls -al "$@" | more

And who are you calling old????

ArfaSmif 04-18-2009 06:52 AM

Quote:

Originally Posted by carltm (Post 3513038)
I'm guessing that the "ll" should be "lm". Otherwise I can't make
sense of your post.

The lm script just needs this:

ls -al "$@" | more

And who are you calling old????

Well that was easy wasn't it. Thanks carltm. (yes ll was meant to be lm)


All times are GMT -5. The time now is 05:39 AM.