1835198 Members
2419 Online
110077 Solutions
New Discussion

Re: setting ps1 variable

 
madhudeepan
Frequent Advisor

setting ps1 variable

when i try to set ps1 variable its showing as

sh: not found

any path do be added????

10 REPLIES 10
Johnson Punniyalingam
Honored Contributor

Re: setting ps1 variable


ITRC member since: May 21, 2009
Last contribution date: December 14, 2009
I have assigned points to 17 of 298 responses to my questions.
Problems are common to all, but attitude makes the difference
Torsten.
Acclaimed Contributor

Re: setting ps1 variable

What was your command?

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
madhudeepan
Frequent Advisor

Re: setting ps1 variable

ps1="'whoami' in 'uname -n'"
Modris Bremze
Esteemed Contributor

Re: setting ps1 variable

Maybe this works:
export PS1="$LOGNAME `uname -n` \$> "
rariasn
Honored Contributor

Re: setting ps1 variable

Hi,

PS1="$(hostname):\$PWD\#"
export PS1

rgs,
Hakki Aydin Ucar
Honored Contributor

Re: setting ps1 variable

Hi,

First,
PS1 must capital letter due to case sensitivy.

And small correction:

# export PS1="`whoami` in `uname -n`#"
ManojK_1
Valued Contributor

Re: setting ps1 variable

Hi,

What Hakki Aydin is said is correct.

command should be always in `` not in ''.

put the below given entry in .profile
export PS1="`whoami` in `uname -n`#"

Manoj K
Thanks and Regards,
Manoj K
madhudeepan
Frequent Advisor

Re: setting ps1 variable

hi

i have changed the terminal TERM=vt100,, previous it was xterm terminal,,, now i need to add this variable entry permanent.

when i closed the session & open it again ,,, i am having the original variable that was before..

is it possiable to add it permanent
Michael Steele_2
Honored Contributor

Re: setting ps1 variable

Dude, you need to go back and assign points to all your responses.
Support Fatherhood - Stop Family Law
NouZ
Occasional Advisor

Re: setting ps1 variable

You can add the same in to .profile file , Then this will get fixed permanently i hope.