LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
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, 03: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 04:08 AM. Reason: typo
 
Old 04-18-2009, 05:18 AM   #2
carltm
Member
 
Registered: Jan 2007
Location: Canton, MI
Distribution: CentOS, SuSE, Red Hat, Debian, etc.
Posts: 697

Rep: Reputation: 93
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, 06: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 10:35 AM
simple bash scripting help shorun Linux - General 2 07-31-2007 07:26 AM
Very simple BASH scripting question clickster Linux - Newbie 6 11-23-2005 04:28 PM
Simple bash/awk/sed scripting question R00ts Programming 4 04-16-2005 02:55 AM
Bash Scripting--Simple Question mooreted Linux - General 4 05-10-2004 01:44 PM


All times are GMT -5. The time now is 06:57 PM.

Main Menu
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