The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to run a script

Discussion in 'General Discussion' started by donnie, Jun 8, 2003.

  1. donnie

    donnie Active Member

    Joined:
    May 23, 2003
    Messages:
    37
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    uk
    Hello Everybody,
    I'm a newbie to Linux and I'm using redhat 7.3. My problem is that I need to execute a script in /script folder(I've root access) but I don't know how to execute it there is star sign at the end of all scripts.

    As soon as I enter the script name and press enter it says command not found. If there is any special command to execute these scripts then pease tell.

    Your help will be appreciated.

    cPanel.net Support Ticket Number:

    cPanel.net Support Ticket Number:
     
  2. casey

    casey Well-Known Member

    Joined:
    Jan 17, 2003
    Messages:
    2,303
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    If there is trouble, it will find me
    Type:

    /scripts/the_script_you_want_to_run

    cPanel.net Support Ticket Number:
     
  3. donnie

    donnie Active Member

    Joined:
    May 23, 2003
    Messages:
    37
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    uk
    Thanks a lot Casey for trying to help me.

    But some other tell me the trick which is working :

    When you are in the /scripts directory you can execute any script using syntax ./scriptname - i.e. in your case type ./easyapache instead of just easyapache.

    Or from any location type /scripts/easyapache and it will do the trick. The star next to any file means that it is executable

    Donnie

    cPanel.net Support Ticket Number:
     
  4. pingo

    pingo Well-Known Member

    Joined:
    Nov 16, 2002
    Messages:
    430
    Likes Received:
    0
    Trophy Points:
    16
    Yes, thats correct. Both of them works. You can choose the one you prefer :)

    John

    cPanel.net Support Ticket Number:
     
  5. hunet

    hunet Member

    Joined:
    Mar 29, 2003
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    1
    Or you can type:

    perl scriptname

    However this method won't work with all scripts :)

    Kevin

    cPanel.net Support Ticket Number:
     
Loading...

Share This Page