Find the answer to your Linux question:
Results 1 to 5 of 5
hi friends, i am thinking of creating a command from a bash script, presently i use ./scriptname to execute the script.. i am thinking of makeing it to execute just ...
  1. #1
    Just Joined!
    Join Date
    Jan 2008
    Posts
    20

    creating a command

    hi friends,
    i am thinking of creating a command from a bash script,
    presently i use ./scriptname to execute the script..
    i am thinking of makeing it to execute just like a command,

    please help.
    thanks in advance
    anshul

  2. #2
    Linux Newbie
    Join Date
    Jul 2008
    Posts
    181
    And what exactly do you think a command is?

  3. #3
    Just Joined!
    Join Date
    Sep 2005
    Location
    China
    Posts
    37
    Quote Originally Posted by anshulsahdev View Post
    hi friends,
    i am thinking of creating a command from a bash script,
    presently i use ./scriptname to execute the script..
    i am thinking of makeing it to execute just like a command,

    please help.
    thanks in advance
    anshul
    Just put your script in the folder which was including in the $PATH. Or your can create a link to it and put the link file in those folder. Such as /bin.

  4. #4
    Linux Engineer Freston's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    1,047
    Usually for this purpose I have an ~/bin directory, and put that in my path.
    Can't tell an OS by it's GUI

  5. #5
    Just Joined!
    Join Date
    Jan 2008
    Posts
    20
    thanks...that worked...

Posting Permissions

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