How to modify the PATH variable and make it executable?

Answers were Sorted based on User's Feedback



How to modify the PATH variable and make it executable?..

Answer / shailendra kumar tiwary

we can set PATH by using export PATH command.
ex:-
PATH=/opt/j2sdk1.4.2_04/bin:............
export PATH

and to make it executable we can set the same
in ".bash_profile".

To execute it ". .bash_profile"

Is This Answer Correct ?    3 Yes 0 No

How to modify the PATH variable and make it executable?..

Answer / swaroopa

use setenv command to set the path

eg: setenv PATH "/workingdir/"

Is This Answer Correct ?    1 Yes 0 No

How to modify the PATH variable and make it executable?..

Answer / kaustubh

In shell we can set any env variables in .bashrc file,
.bash_profile file in the user directory or fin /etc/bashrc

by setting variable name PATH(here)
and then export
example

PATH=$home/bin/
export PATH

Is This Answer Correct ?    1 Yes 1 No

Post New Answer

More Shell Script Interview Questions

if i have 2 files file1 and file2.... file1 contains 2 columns like b a 11 aa 12 as 13 ad 15 ag 11 ar 13 ah 15 ak file2 contains b c 10 ds 11 at 15 gh 15 jk 13 iu 11 fg 13 yy can any 1 give me the program to display in this way? a b c aa 11 at ar 11 fg ad 13 iu ah 13 yy ag 15 gh ak 15 jk

3 Answers  


Why should we use shell scripts?

0 Answers  


i have 2 tables 4 colums table 1 respective values a1 6, a2 8,a3 9,a4 14 & table 2 respective values a1 6, a2 8, a3 9, a4 12. if compare 2 tables 3 colums values same then 4th column values 1)Qes diff >5 then (5 * diff value ) 2)Qes diff <5 the 5 3)Qes diff 5 then 5 print respective values..

0 Answers   Tech Mahindra,


madhar chod unix ke 10 commands dhang se likh nahi sakta hai

0 Answers   Cap Gemini,


what is the difference between writing code in shell and editor?

1 Answers  






What is awk in shell scripting?

0 Answers  


what is the difference between cmp and diff commands

2 Answers   Amazon, CTS,


How do we create command aliases in a shell?

0 Answers  


In which variable prompt value is stored?

2 Answers  


how to get part of string variable with echo command only?

0 Answers  


In shell scripting if text is surrounded by single quotes what does it denotes?

3 Answers  


c program the catches the ctrl-c(SIGINT) Signal for the first time and prints a output rather and exit on pressing Ctrl-C again

2 Answers  


Categories