Find the answer to your Linux question:
Results 1 to 4 of 4
Hi everone, I have copied a script to a directory that appears in $PATH but when I check: Code: $] which <script> . I get: Code: <script>: Command not found. ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jan 2013
    Posts
    2

    Shell doesn't recognize script


    Hi everone,
    I have copied a script to a directory that appears in $PATH but when I check:
    Code:
    $] which <script> .
    I get:
    Code:
    <script>: Command not found.
    I have checked that the script is executable.
    Any Ideas ?

  2. #2
    Just Joined!
    Join Date
    May 2011
    Location
    Brazil
    Posts
    21
    Hey,

    After that, run echo $?

    What is the response?

  3. #3
    Trusted Penguin Irithori's Avatar
    Join Date
    May 2009
    Location
    Munich
    Posts
    3,386
    hi and welcome

    Is the dot at the end of the which command a typo?

    Also, can you please post the output of
    Code:
    echo $PATH
    ls -la <PATH_TO_YOUR_SCRIPT>
    You must always face the curtain with a bow.

  4. #4
    Just Joined!
    Join Date
    Jan 2013
    Posts
    2
    I found the problem. I'm running under tcsh
    and after copying script you need to run 'rehash' command

Posting Permissions

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