[techtalk] BASH command return value

kelly at poverty.bloomington.in.us kelly at poverty.bloomington.in.us
Mon Aug 7 05:35:57 EST 2000


On Fri, 4 Aug 2000 11:34:07 -0400, Subba Rao <subb3 at attglobal.net> said:

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

Because 'whoami' is a command, and running it resets $?.  \u just
looks up the username internally.

Kelly





More information about the Techtalk mailing list