LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices



Reply
 
Search this Thread
Old 04-18-2009, 04:49 AM   #1
ArfaSmif
Member
 
Registered: Oct 2008
Location: Brisbane Australia
Distribution: always back to Fedora
Posts: 241

Rep: Reputation: 50
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?

Last edited by ArfaSmif; 04-18-2009 at 05:08 AM. Reason: typo
 
Old 04-18-2009, 06:18 AM   #2
carltm
Member
 
Registered: Jan 2007
Location: Canton, MI
Distribution: CentOS, SuSE, Red Hat, Debian, etc.
Posts: 700

Rep: Reputation: 96
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????
 
Old 04-18-2009, 07:52 AM   #3
ArfaSmif
Member
 
Registered: Oct 2008
Location: Brisbane Australia
Distribution: always back to Fedora
Posts: 241

Original Poster
Rep: Reputation: 50
Quote:
Originally Posted by carltm View Post
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)
 
  


Reply

Tags
bash, scripting


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
bash scripting simple question wildtiger23 Programming 1 03-04-2009 11:35 AM
simple bash scripting help shorun Linux - General 2 07-31-2007 08:26 AM
Very simple BASH scripting question clickster Linux - Newbie 6 11-23-2005 05:28 PM
Simple bash/awk/sed scripting question R00ts Programming 4 04-16-2005 03:55 AM
Bash Scripting--Simple Question mooreted Linux - General 4 05-10-2004 02:44 PM


All times are GMT -5. The time now is 09:35 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration