|
|||||||
| Forums | Search Forums | Register | Forum Rules | Man Pages | Albums | FAQ | Members | Calendar | Search | Today's Posts | Mark Forums Read |
| 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 Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Script not executing
Hello,
I wasn't sure where to post this so I posted it here. I've used UNIX quite a bit, LINUX not so much. For some reason, my LINUX script will not execute if I type in the script name and press enter. I'm in the directory where the script is. test.sh However, when I use ". ./" it executes fine. I was wondering why this is and what I need to do to have it execute at the command prompt without the ". ./". . ./test.sh This is part of a bigger question and issue I'm having which I'm not looking to resolve here. I'm trying to install Informatica 9.1 onto a LINUX RedHat platform. The install script wouldn't run when I typed in install.sh. When I ran it with ". ./install.sh a number of error messages popped up and the install hung. I'm working with Informatica Support on this. Regards, Jim |
| Sponsored Links | ||
|
|
#2
|
|||
|
|||
|
Shouldn't that be Code:
./test.sh Or Code:
/fullpath_to_script/test.sh The reason your script won't execute as just test.sh is because the directory containing the script is not in $PATH . Your other system may have had . in $PATH (i.e. any current directory) which is a big security risk. |
| Sponsored Links | ||
|
|
#3
|
|||
|
|||
|
Thanks
Thank you,
I didn't notice that this system when I did an "ls", did not have a '.' or a ".." directory. I do remember other systems I've worked on did have those directories. That certainly makes sense now. Regards, Jim |
|
#4
|
|||
|
|||
|
. and .. definitely exist in Linux too, though ls may not show them. They have the usual meaning, current folder and previous folder.
|
| Sponsored Links | |
|
|
#5
|
|||
|
|||
|
You may be misunderstanding me about
$PATH . Try this command to show you the contents of the standard $PATH variable. It lists all the directories in order which the Operating System will search when looking for a program or executable script. If the variable $PATH contains . (current directory) then it will also look in whatever is the current directory. Code:
echo "${PATH}"The . and .. directories are always there. Try: Code:
ls -la |
| Sponsored Links | |
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Help with executing script | pawannoel | UNIX for Dummies Questions & Answers | 6 | 03-25-2011 11:50 AM |
| Variables of executed script available in executing script | dips_ag | Shell Programming and Scripting | 9 | 05-11-2010 11:54 PM |
| Executing a shell script from windows;script present in unix | rajneesh_kapoor | UNIX for Advanced & Expert Users | 4 | 05-08-2009 02:54 PM |
| [AIX] executing script | piooooter | UNIX for Dummies Questions & Answers | 1 | 05-26-2006 12:53 AM |
| script not executing | dreams5617 | Shell Programming and Scripting | 3 | 12-06-2004 04:15 PM |
|
|