An example from the dd manual.
Kernel 2.6.21.5, Slackware 12.0
Hi: Code:
Sending a USR1 signal to a running `dd' process makes it print I/O sta- |
Hey STF,
I use this approach myself sometime. Anyway, here's my clarification of that example (which is exactly that, an example of little practicality.) Code:
# Write from /dev/zero into /dev/null, and do it in the background (note the &.) |
Oh thanks, jhwilliams. I knew the meaning of pid=$! as I had looked for ! in the bash man. pid is an arbitrary name, and $! extracts the value of !. But in the first line of the example, there is not a semicolon (';') to separate the two commands. But bash interpreted the right way! It seems as if, after an ampersand, the semicolon is superfluous.
By the way, what is the meaning of USR1 or a reference to it. I have a demo board, able to run linux (embedded) with two LEDs (light indicator) , USR0 and USR1. |
Checkout the entry for signal in section 7 of the man pages on your platform:
Code:
man 7 signal This has got me before, too. It's more confusing in a for loop syntax: Code:
for item in $list; do background_job $item & done |
Thanks a lot!
|
NP :-)
|
I rushed to consider the thing solved: What makes ';' redundant?
|
Quote:
|
Ahhh, '&' acts as a separator too,and with the same precedence as ';'! Most kind of you.
|
All times are GMT -5. The time now is 11:26 AM. |