![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| please help me regarding alias | naree | Shell Programming and Scripting | 17 | 06-03-2008 01:14 AM |
| How to get the alias,when we have the IP. | preethgideon | UNIX for Dummies Questions & Answers | 2 | 07-24-2007 11:53 AM |
| alias help | shafique | UNIX for Dummies Questions & Answers | 5 | 10-03-2006 09:56 AM |
| Help with find command on a shortcut directory(Alias)??? | swamy455 | UNIX for Dummies Questions & Answers | 2 | 07-07-2005 10:32 AM |
| Alias | klannon | UNIX for Dummies Questions & Answers | 2 | 03-10-2002 02:54 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
#1
|
||||
|
||||
|
I've tried to define an alias for the find cmd. I want a find -name and send the error messages to /dev/null. I entered the alias as followed:
# alias myfind 'find $1 -name $2 2>/dev/null' But it didn't work. Any idea what's wrong with that? |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
You are probably using the korn shell or some shell similiar to it. They don't have powerful alias commands that can handle stuff like that. You must use functions instead:
myfind() { find $1 -name $2 2>/dev/null ; } |
|
#3
|
||||
|
||||
|
thx, that worked!
__________________
regards, sTorm |
||||
| Google The UNIX and Linux Forums |