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

Re: Temporary color prompt in bash script



Hi,

Computer Planet wrote:
> Is It possible to print of a string at the exit of a bash script?
> e.g.: user@mypc: # bash script has just finished! [prompt]
> with the prompt that remains immediately after the string printed.

Do you mean something like this ?

  $ echo -n 'user@mypc: # bash script has just finished! '
  user@mypc: # bash script has just finished! $

The string "$ " is the prompt as of shell variable PS1.
Note that you need to set PS1 in the dialog shell, not in the script,
because the setting in the script is not present any more when the
dialog shell prints its prompt after the script ended.


Have a nice day :)

Thomas


Reply to: