![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Don't confuse . (source the script) with ./ (Under the current directory)
. test.sh = source test.sh Now the shell looks for the directories in the path ($PATH). If it finds test.sh in any of those directories it will execute or you would have to go to that directory and do a ./test.sh To avoid doing a ./ do the following. Edit your .bash_profile or .bashrc file under your home directory. add the line export PATH='$PATH:.' -> i.e. add a . to the end of the path If this doesn't work for you change the single quotes to double quotes. Run echo $PATH to check if the path is correct. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|