run command via ps/bash prompt
Tim Waugh
twaugh at redhat.com
Thu Mar 9 18:12:23 UTC 2006
On Thu, Mar 09, 2006 at 12:34:56PM -0500, Joe Szilagyi wrote:
> 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.
Search for 'PROMPT_COMMAND" in the bash man page. FWIW, Fedora Core
actually ships with a PROMPT_COMMAND set like this:
$ echo $PROMPT_COMMAND
echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/~}\007"
Tim.
*/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/fedora-list/attachments/20060309/f65f3d18/attachment-0001.sig>
More information about the fedora-list
mailing list