Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Blog | Linux Links | Bling | About BLU

BLU Discuss list archive


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

BASH command return value



On Fri, 4 Aug 2000, Subba Rao wrote:

> In BASH, why does the "\u" and "whoami" make a big difference for the $?
> value in PS1 string? The BASH version is 2.04.

The \u is interpreted by bash within the local process. The `whoami` runs
the "whoami" command while printing the prompt, and this updates the value
of $?. The $? in PS1 gets evaluated before the "whois" gets executed. 

--
John Abreau / Executive Director, Boston Linux & Unix 
ICQ#28611923 / AIM abreauj

Email: (temporarily)  jabr at world.std.com

-
Subcription/unsubscription/info requests: send e-mail with
"subscribe", "unsubscribe", or "info" on the first line of the
message body to discuss-request at blu.org (Subject line is ignored).




BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org