Find the answer to your Linux question:
Results 1 to 2 of 2
Hi All, When I try to invoke 'source' command from within a shell script, namely, myscript.sh, I get the following error message: Code: ./myscript.sh: 3: source: not found However, I ...
  1. #1
    Just Joined!
    Join Date
    Nov 2009
    Posts
    43

    Question can't invoke a command from within a shell script

    Hi All,

    When I try to invoke 'source' command from within a shell script, namely, myscript.sh, I get the following error message:

    Code:
    ./myscript.sh: 3: source: not found
    However, I can invoke 'source' from command line and from any location.

    Below is the problematic first few lines of myscript.sh:

    Code:
    #!/bin/sh
    
    source /opt/intel/Compiler/11.1/072/bin/iccvars.sh intel64
    Any ideas ?

    Thanks.

  2. #2
    Just Joined!
    Join Date
    May 2010
    Posts
    5
    try "ls /opt/intel/Compiler/11.1/072/bin/iccvars.sh" to check if the path is correct and/or the iccvars.sh is located on the specified location

Posting Permissions

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