hi all, please tell me why this 2 liner script is not working!!
#!/bin/bash
oldps1="$PS1"
PS1="myprompt>"
but when type this in terminal it works!!
hi all, please tell me why this 2 liner script is not working!!
#!/bin/bash
oldps1="$PS1"
PS1="myprompt>"
but when type this in terminal it works!!
How about ...
export PS1="myprompt>"
thanks dr.house...but its not working...the prompt is still the same!!
try also:
PS1="myprompt>"
export PS1
instead of just executing the script, source it.
# source scriptname
thanks ilikecows!!!!!!!
it worked..
Either u can source it or execute the script by
. <file name>
So the script would execute in current shell and the variable would availabe there.