Re: Displaying PS1 from shell scripts

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2003-11-14 at 14:50, Peramslist wrote:
> Hi,
> 
> I'm need to display the PS1 envronmental variable through a script on my RH9 box. When I key in "echo $PS1" in the script I just get a blank but when I key in the same at the prompt I get the result.
> I'd appreciate if you can let me know how I can display the variable as I did a google search but in vain.
> Thanks in advance for all your replies.
> 

bash behaves differently if invoked from a script.  it is not an
interactive shell at that point and /etc/profile is not called.

check out man bash and search for PS1

What is it that you need to prompt for?  perhaps you can get the info
differently.  You might be able to invoke bash differently or hell. call
/etc/profile and see if that does it.

Bret


-- 
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux