If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Unix Shell Scripts > AIX Call script vs. Dot script

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-29-05, 15:13
PMASchmed PMASchmed is offline
Registered User
 
Join Date: Jun 2004
Location: Long Island
Posts: 696
AIX Call script vs. Dot script

A coworker of mine is having an issue with ksh on AIX whereas a call script ${dir}/script.ksh does not work , but with the addition of a . ${dir}/script.ksh does work. She gets a file not found error when running it as a call script.

Any ideas. This works fine on HP-UX, but for some reason AIX presents an issue.

thanks

Last edited by PMASchmed; 12-29-05 at 15:21.
Reply With Quote
  #2 (permalink)  
Old 01-03-06, 20:17
Sundarpn Sundarpn is offline
Registered User
 
Join Date: Aug 2004
Posts: 43
THough I don't have an answer...

can you tell me what these two different methods of executing a script are?

The most obivious way that I know of is to give the script executable permission and just run it...

and I faily remmeber that . command is used to execute the hidden files like .profile?
Reply With Quote
  #3 (permalink)  
Old 01-12-06, 07:58
ducasio ducasio is offline
Registered User
 
Join Date: Aug 2004
Location: Rome, Italy
Posts: 81
Hi,
I think your problem is not connected with the OS. Maybe the administrator of AIX hasn't put the current directory(.) on you PATH environment variable(which is the correct way to set up your session). Putting a dot-slash(./) before the filename to execute it means to search for that script on the current directory. Normally you should execute a script that resides on your current directory like this:

./my_script

But you can execute the script on the same shell where you are without giving the execute permission like this:

. ./my_script

bye,
ducasio
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On