run command via ps/bash prompt

Joe Szilagyi js at axxs.net
Thu Mar 9 17:34:56 UTC 2006


Hi,

Have something I have tried to get working, unsuccessfully:

PS1="\n\[`cat $HOME/file.txt`\] \n \@ \u@\h \w $ "

Basically, wanting the bash prompt to always execute a command. It does not 
update, unless bashrc is updated with source .bashrc. Is there any way 
around this directly in the PS1 settings? If not, I saw more complex ways to 
do similar things by defining functions, but was curious if there was a more 
basic way to do this.

Regards,
Joe








More information about the fedora-list mailing list