Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ailiases i bash

Status
Not open for further replies.

CaKiwi

Programmer
Apr 8, 2001
1,294
US
How do i create an alias in a bash hell which will include its argument? e.g. in csh if i have an alias
Code:
alias ll "ls -l \!* | more"
entering
Code:
ll /tmp
is equivalent to
Code:
ls -l /tmp | more
Thanks in advance. CaKiwi
 
Hi CaKiwi,

The is no way tho include argument in the alias like with csh.

The only solution is to define a function intead of an alias :

function ll {
ls -l "$@" | more"
}
Jean Pierre.
 
Thanks Aigles, I haven't had a chance to try it yet. I will let you know the results when I do. CaKiwi
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top