Chris Down wrote:
On 2013-08-18 17:46, Linda Walsh wrote:
I don't find the variable for the process ID of the
last started background process documented in the bash manpage...
Am I just missing it, or did it get left out by accident or
where did it go?
First of all, it would help if you gave your version. At least in 4.2.45, it's
under "Special Parameters".
Special Parameters
[...]
! Expands to the process ID of the most recently executed
background (asynchronous) command.
---
That explains it... There's -- in searching the output, I'm
pretty sure that seeing a stray '!' in the left hand margin
wouldn't have looked like a var.
In this case, especially for the 1 char vars, wouldn't it be
easier to help people see them and help them search for them
if they included the '$' before them so they wouldn't look
like stray punctuation? or so I could search on \$[^a-zA-Z0-0]
and find it?
It would make finding it alot easier for people skimming or
searching for it. (Not that, it isn't technically accurate,
but searching for a single '!' as the name of a var in
text doc, might lead to quite a few false positives?
(im in V4.2.x bash, BTW,...sorry)