Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

running a .sh from anywhere?

Status
Not open for further replies.

stewm

MIS
Oct 10, 2003
171
CA
Hello,

I need to be able to run a shell script called /opt/rsserver.sh from anywhere on my Unix box and I want anyone else who logs on to that machine to be able to run it from anywhere too.

How can I type rsserver no matter where I am and it runs rsserver.sh?

Every time I try to creat an alias or something it says invalid command when I enter rsserver at the prompt afterwards.

Thanks

Mark Stewart
Senior Analyst
Consultants Club Corp.
Windsor, Ontario
Canada
 
In /etc/profile create a function named rsserver that launch /opt/rsserver.sh
Anyway the alias is also a good idea, how you tried that ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Thanks, PH, how do I create a function that launches /opt/rsserver.sh?

I tried

ALIAS rsserver = "./opt/rsserver.sh"

Mark Stewart
Senior Analyst
Consultants Club Corp.
Windsor, Ontario
Canada
 
Have you tried this ?
alias rsserver="/opt/rsserver.sh"
Anyway take a look at your shell man page.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top