Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


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

Posted on 2003-03-17
Medium Priority
Last Modified: 2010-04-21
What do I change so I don't have to type in a "./" before executing a shell script?
Question by:894359
  • 2

Author Comment

ID: 8155630
fyi... ksh
LVL 48

Accepted Solution

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.

Expert Comment

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


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.
LVL 48

Expert Comment

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

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

Hello fellow BSD lovers, I've created a patch process for patching openjdk6 for BSD (FreeBSD specifically), although I tried to keep all BSD versions in mind when creating my patch. Welcome to OpenJDK6 on BSD First let me start with a little …
Using libpcap/Jpcap to capture and send packets on Solaris version (10/11) Library used: 1.      Libpcap (http://www.tcpdump.org) Version 1.2 2.      Jpcap(http://netresearch.ics.uci.edu/kfujii/Jpcap/doc/index.html) Version 0.6 Prerequisite: 1.      GCC …
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 Month10 days, 17 hours left to enroll

571 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