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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

executing scripts 1

Status
Not open for further replies.

teser

Technical User
Mar 6, 2001
194
US
How can I get my scripts in root to run by just typing in the name.

It works with just the name on my regular user log in.

But when I log in as root I have to do this:

./scriptname


where as any script I run in my user log in I just type:

scriptname



My profile is in .cshrc

Any suggestions?
 
It's usual (for security reasons) for root to NOT have "." in it's path.

You could add it, but this is a BAD THING (tm) and leaves you open to accidental or deliberate abuse!
One by one, the penguins steal my sanity.
 
ensure that the path of the scripts is in your PATH env.

For your case do the following
setenv PATH .:$PATH

After this, the scripts will execute just by the name. If you are very sure, you could add this to your .cshrc file

Mohan
 
an easier way will be to create a soft link in /usr/bin directory for ur script Thief................
(In a confrontation between a rock and stream, the stream always wins, not because of strength but persistence.)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top