?
Solved

What do I change so I don't have to type in a "./" before executing a shell script?

Posted on 2003-03-17
4
Medium Priority
?
184 Views
Last Modified: 2010-04-21
What do I change so I don't have to type in a "./" before executing a shell script?
0
Comment
Question by:894359
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 

Author Comment

by:894359
ID: 8155630
fyi... ksh
0
 
LVL 48

Accepted Solution

by:
Tintin earned 200 total points
ID: 8155898
Add the path to the PATH environment variable.

For example, if the script is in /usr/local/scripts then doing

export PATH=$PATH:/usr/local/scripts will add /usr/local/scripts to the search path.

Add to your .profile to make the changes permanent.
0
 
LVL 2

Expert Comment

by:ellesd
ID: 8155900
You need to add a '.' to your path.

PATH=/bin:/usr/bin:.

This is normally done for regular users and not root.  The dot '.' represents your current directory and the PATH variable tells the shell where to look for thing you type.
0
 
LVL 48

Expert Comment

by:Tintin
ID: 8155995
I wouldn't recommend adding a . to the path for even regular users.
0

Featured Post

Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A metadevice consists of one or more devices (slices). It can be expanded by adding slices. Then, it can be grown to fill a larger space while the file system is in use. However, not all UNIX file systems (UFS) can be expanded this way. The conca…
Java performance on Solaris - Managing CPUs There are various resource controls in operating system which directly/indirectly influence the performance of application. one of the most important resource controls is "CPU".   In a multithreaded…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.
Suggested Courses
Course of the Month14 days, 10 hours left to enroll

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question