Starting script problem
When I make a script and make it executable it starts if I type like this: ./myscript. The question is why I must type ./ infront of scripts name.
10x.
Linux
When I make a script and make it executable it starts if I type like this: ./myscript. The question is why I must type ./ infront of scripts name.
10x.
by insatiable
Hi!
When you're executing a script in the Unix environment, the ./ tells the computer that you want to work with the file in the current directory, rather than search through your PATH setting.
I hope that helps.
Good luck!!
Melissa
by cybergod
by peterdoh
When you login to shell you could set current directory in PATH with a (.) and you would not need to type ./ because current directory would be in PATH.
PATH=/usr/bin:/usr/sbin:.
export PATH
by cybergod
by cavedweller
by cybergod
by cpfeiffe
by cybergod
by cybergod
This discussion is closed to new replies.
Sort by Trending