Results 1 to 4 of 4
Hello,
I have a script that I run using ./dom example.com.
I want to add an alias to .bashrc so that I can run it using "d example.com".
I have ...
- 02-09-2011 #1Just Joined!
- Join Date
- Sep 2009
- Posts
- 3
Adding Alias to .bashrc
Hello,
I have a script that I run using ./dom example.com.
I want to add an alias to .bashrc so that I can run it using "d example.com".
I have tried adding each of the lines below in turn but I still receive the error:
-bash: d: command not found
alias d="/bin/bash /home/user/dom"
alias d="./home/user/dom"
alias d="sh /home/user/dom"
Any help is greatly appriciated.
Regards,
Colin
- 02-09-2011 #2
add
alias d='/home/user/dom '
to the ~/.bashrc
and relogin. You script is only sourced when you open a new shell session (or relogin.)New to the internet, technical forums, or the hacker / open source community??
Read this to learn good posting habits http://www.catb.org/~esr/faqs/smart-questions.html
RHCE for RHEL version 5
RHCT for RHEL version 4
- 02-09-2011 #3Just Joined!
- Join Date
- Sep 2009
- Posts
- 3
Thank you for your help.
Worked a treat.
Colin
- 02-10-2011 #4
You can edit .bashrc and then type source ~/.bashrc. The changes will then be in effect
Glenn
Powered by Fedora 16 and Arch Linux


Reply With Quote