Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2003
    Posts
    12

    Unanswered: 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.

  2. #2
    Join Date
    Oct 2003
    Location
    Slovakia
    Posts
    482

    Re: cannot open: No such file or directory

    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.

  3. #3
    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.

  4. #4
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •