Results 1 to 8 of 8
How can i make my script run that is in "mactabilis home" What is on the desktop,without doing ./<script>,I just wont it to run by simply typing the name without ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 10-25-2005 #1
Not ./
How can i make my script run that is in "mactabilis home" What is on the desktop,without doing ./<script>,I just wont it to run by simply typing the name without the ./ I mv the script to bin to see if that would work but still when i type the name of it it cant find it ,i changed the permissions with chmod 755 and changed my path, It does run after i do export PATH=$PATH:/mactabilis/home/ .But when i got out of terminal and come back in i have to type PATH=$PATH:/mactabilis/home/ again to get it to run without ./.
- 10-25-2005 #2Linux Engineer
- Join Date
- Apr 2005
- Location
- Belgium
- Posts
- 1,429
Edit .bashrc or .bash_profile and add your path to that.
As for ./script, it is convention that you run it like that when you are in the directory where the script is. For scripts or programs in other directories, you can just type the name without the ./. Surely the ./ convention is there for a reason (as about anything in Linux
).
** Registered Linux User # 393717 and proud of it
** Check out www.zenwalk.org
** Zenwalk 2.8 - Xfce 4.4 beta 2- 2.6.17.6 kernel = Slack on steroids! **
- 10-25-2005 #3Linux Engineer
- Join Date
- Nov 2004
- Location
- Ft. Polk, LA
- Posts
- 796
Add . to your path. This will make anything in your current directory searched in your path, so that you dont need to type ./ .
- 10-25-2005 #4
Not ./
Like i said i have eddited the .bash_profile and i still cant run it from other dir ,I see your point
What is correct,But i'm not sure how i would eddit the .bashrc for this, ive only ever put simple things in there like rm='rm -i' .
- 10-26-2005 #5
Not ./
Ok thanks that has done the job nicely i can run 'my script' from any directory without doing ./ ,But when i run a alias command i have to ,source .bash_profile for them to work each time i go back in to the Terminal.
- 10-26-2005 #6
hmm, you might want to try and put source ~/.bash_profile in your ~/.bashrc
- 10-26-2005 #7
Not ./
No go there,so I moved them over to .bashrc ,but still even there i have to type source .bashrc
to activate my alias commands each time i start Terminal.
- 10-26-2005 #8
hmm, do you have this line in your .bash_profile:
[ -f ~/.bashrc ] && . ~/.bashrc


Reply With Quote
