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 > cannot open: No such file or directory

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-20-03, 05:16
shyams75 shyams75 is offline
Registered User
 
Join Date: Aug 2003
Posts: 12
cannot open: No such file or directory

Hi,

When I run the following command, sh channels.ksh test2.txt, I get the "Cannot Open" error. The file test2.txt is the input file for the script and it does exist in the same folder as the shell script. Can somebody help me in finding what I am missing here?

Shyam.
Reply With Quote
  #2 (permalink)  
Old 12-20-03, 08:45
ika ika is offline
Registered User
 
Join Date: Oct 2003
Location: Slovakia
Posts: 482
Re: cannot open: No such file or directory

Quote:
Originally posted by shyams75
Hi,

When I run the following command, sh channels.ksh test2.txt, I get the "Cannot Open" error. The file test2.txt is the input file for the script and it does exist in the same folder as the shell script. Can somebody help me in finding what I am missing here?

Shyam.
You are missing the path where is file located.
Reply With Quote
  #3 (permalink)  
Old 12-22-03, 00:04
shyams75 shyams75 is offline
Registered User
 
Join Date: Aug 2003
Posts: 12
The file is in the same directory as that of the script.
I get the same error even if I give the path for the file.

Shyam.
Reply With Quote
  #4 (permalink)  
Old 12-22-03, 16:30
fla5do fla5do is offline
Registered User
 
Join Date: Oct 2003
Location: Germany
Posts: 138
Can it be that your $PATH do not include the folder .
Try to start your script with a point and slash at the beginning like following.
sh ./channels.ksh test2.txt.

The second tip I have : check the permissions from the file test2.txt.

Use chmod 777 test.txt and you will sure the permissions are OK

Itīs only a try.
__________________
Greetings from germany
Peter F.
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