Professional Web Applications Themes

script_prooblem - Linux Setup, Configuration & Administration

i used to call script by name to get executed. when i call "MYSCRIPT" from the command line , it used to be executed. now, when i issued the name of the script, i get a message "command is not fount". i run the script from the directory in which the script reside, also, the mode i have for the scripts is rwx r-x r-x. even my old script which used to run as soon as i type its name and hit enter key, does not anymore and keep getting a message from redhat "command is not found" thanks...

  1. #1

    Default script_prooblem

    i used to call script by name to get executed. when i call "MYSCRIPT"
    from the command line , it used to be executed. now, when i issued the
    name of the script, i get a message "command is not fount". i run the
    script from the directory in which the script reside, also, the mode i
    have for the scripts is
    rwx r-x r-x. even my old script which used to run as soon as i type
    its name and hit enter key, does not anymore and keep getting a
    message from redhat "command is not found"
    thanks
    gamalt Guest

  2. #2

    Default Re: script_prooblem

    On 5 Oct 2003 01:01:09 -0700, com (gamalt) wrote:
     

    Check your path. The current directory normally is not parth of the
    path. Use ./MYSCRIPT to force execution of the script in the current
    directory.

    Regards
    Anton Erasmus

    Anton Guest

  3. #3

    Default Re: script_prooblem

    On 5 Oct 2003 01:01:09 -0700, gamalt <com> wrote: 

    The script use to be on your PATH.

    $ echo $PATH

    If a script/program isn't on your PATH (where the shell looks for executables)
    then you have to give the shell the executable's full path.
    Assuming that the script is on your Home directory:


    $ /home/you/script

    $ $HOME/script

    $ ~/script

    or, if you are in your Home directory too:

    $ ./script

    Or move the script to a directory in your PATH or put the directory
    it's in in your PATH. (Think thrice before doing the last. Is worst choice.)

    Study the first 9 chapters of http://rute.sourceforge.net


    --
    Later, Alan C
    You can find my email address at the website: contact.html
    take control of your mailbox ----- elrav1 ----- http://tinyurl.com/l55a
    Alan Guest

  4. #4

    Default Re: script_prooblem

    gamalt wrote:
     

    run it like this (be sure to include the "./"):
    # ./script_name
    ..
    --
    /// Michael J. Tobler: motorcyclist, surfer, skydiver, \\\
    \\\ and author: "Inside Linux", "C++ HowTo", "C++ Unleashed" ///
    \\\ http://pages.sbcglobal.net/mtobler/mjt_linux_page.html ///
    Serenity through viciousness.

    mjt Guest

Bookmarks

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139