how can i change my PATH


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting how can i change my PATH
# 1  
Old 03-01-2011
how can i change my PATH

1. that you are calling the POSIX UNIX commands located under /usr/xpg4/bin instead of those under /usr/bin
2. that you can run programs from the current directory

3. that your scripts located in the bin directory under your HOME directory can be found and executed from any location
4. that you can find and run programs from the system binaries /usr/sbin, the Sun Freeware directory /usr/sfw/bin, directories for additional software such as /opt/bin, /usr/local/bin and /usr/local/sbin
5. search the location for the perl 5 binaries, such as perldoc, and add that location to your PATH


i tried this tow path but it's not working

ð PATH=/usr/xpg4/bin:/usr/bin:/usr/sbin:/usr/sfw/bin:/opt/bin:/usr/local/bin:/usr/local/sbin:/usr/perl5/bin/perldoc:/export/home/bin:/$HOME:/etc:.

export PATH=$PATH:/usr/xpg4/bin:/usr/bin:/export/home/vpatel44/bin:/usr/sbin:/usr/sfw/bin:/opt/bin:/usr/local/bin:/usr/local/sbin:/usr/perl5/pod:/etc/:.

# 2  
Old 03-01-2011
Do not post classroom or homework problems in the main forums. Homework and coursework questions can only be posted in this forum under special homework rules.

Please review the rules, which you agreed to when you registered, if you have not already done so.

More-than-likely, posting homework in the main forums has resulting in a forum infraction. If you did not post homework, please explain the company you work for and the nature of the problem you are working on.

If you did post homework in the main forums, please review the guidelines for posting homework and repost.

Thank You.

The UNIX and Linux Forums.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

How to change the path location within the shell script?

Hi ALL, I am trying to find the installed tomcat version and location of the server.xml file to get the tomcat port number. Using below script to do that. #!/usr/bin/env bash var1=$(find / -name "version.sh" ! -size 0 2>&1 |egrep -v "tmp|docker") for loc1 in $var1 do ... (1 Reply)
Discussion started by: sravani25
1 Replies

2. UNIX for Dummies Questions & Answers

Extract name from path and change output

Dear All, I would like to extract the file name without extension form a variable... In particular I have a command like this one: for file in path/to/file/example_number.ext do something -input $file -output ${file%_number.ext}.new done means that in variable $file are saved all the path... (3 Replies)
Discussion started by: giuliangiuseppe
3 Replies

3. Shell Programming and Scripting

Change Shell Command Path

I want to change the path for the command in a shell. I want to make it easier to type in the command when I run the shell. As of now, I have to type in /bin/ls but I want to just type in "ls" instead. I have altered the function below to do this but it's not working. It still must have the full... (1 Reply)
Discussion started by: JustinT2474
1 Replies

4. SuSE

change PATH problem

Hi, I want to add a path to PATH. I added export PATH=$PATH:$HOME/newpath in the ~.profile. I exit the shell and reenter shell. After I type echo $PATH. The new path is not added. I don't know why. Can someone give advice? Thanks! (3 Replies)
Discussion started by: jianma
3 Replies

5. Shell Programming and Scripting

How to change Absolute path to Relative path

Hello, I have a doubt:- --------------------- Current script:- ################################################################################################ prefix=user@my-server: find . -depth -type d -name .git -printf '%h\0' | while read -d "" path ; do ( cd "$path" || exit $?... (4 Replies)
Discussion started by: sahil_jammu
4 Replies

6. HP-UX

change directory path

Hi, when ever i login my unix system it is going to root directory....how can i change it specified directory.. (3 Replies)
Discussion started by: rsivasan
3 Replies

7. Solaris

How to permanatly change PATH

I used set PATH$ but that worked until I closed Terminal , now qouestion is how to put this in... (7 Replies)
Discussion started by: microbot
7 Replies

8. UNIX for Dummies Questions & Answers

change and replacing headerfile path

Hello, I just need to repalce my include path of an cd.h file in a dir which is having more tha 100 files. I used some sed and grep but unsuccessful. I am using HP_UX and i need to change #include "cd.h" to #include <cd.h> Please advise me. (1 Reply)
Discussion started by: jagan_kalluri
1 Replies

9. What is on Your Mind?

Career Path/Change - Cert Help

This is a very serious post. I am a Cell Technician (Cellular Base Station Tech) who is completely bored because my job has basically evolved into a Field Secretary position. I love working on T1's and troubleshooting equipment outages and so on and so forth but my job has become VERY... (2 Replies)
Discussion started by: CoopDeVille
2 Replies

10. UNIX for Advanced & Expert Users

Change Default Path ?

Dear All When i am telnet' ing to some IP, after logging in, i am into some default path.I want to specify "custom path" , that is after logging in , when i do pwd it should be custom path.For this where i have to change the setting or edit the path already specified. I am having... (4 Replies)
Discussion started by: tkbharani
4 Replies
Login or Register to Ask a Question