![]() |
|
|
|
|
|||||||
| 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 |
| Alias Help | NetJones | UNIX for Dummies Questions & Answers | 1 | 03-16-2008 02:47 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 | klannon | Filesystems, Disks and Memory | 6 | 04-27-2006 05:36 AM |
| Alias | sunhata | Shell Programming and Scripting | 3 | 01-29-2006 03:03 AM |
| alias | sskb | UNIX for Dummies Questions & Answers | 2 | 12-17-2001 08:53 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
|||
|
alias creation
I am trying to set up an alias called "fire" that will allow me to pass an argument(s) along with the command.
#fire program1 restart the fire alias should resolve to "/etc/rc.d/init.d/" and then stick the "program1" immediatly after the trailing slash so it appears as one command with one argument. #/etc/rc.d/init.d/program1 restart I would like to put this alias in my .cshrc file but can't get the alias working? Thanks. |
| Forum Sponsor | ||
|
|
|
|||
|
Thanks for the reply; however, it still gives an error
bash: /etc/rc.d/init.d/!:*: No such file or directory My alias declaration looks like this... alias start='/etc/rc.d/init.d/\!:*' I run it by this command... # start app1 restart |
|
|||
|
Perderabo gave a correct answer for what you asked and it does work....in csh. You wrote you wanted to add it to .cshrc.
If your account isn't using csh, then it may not work - please insure which shell you need the alias set up in as each could/would be different from csh. (You may also want to put what OS you are using.) |