What "nonblocking" command makes tcsh wait until a specific background task completes and then "alerts" me by running a command of my choosing?
I want "wait %3 && xmessage job completed &" to wait until background job [3] is finished and then xmessage me "job completed", but want this co开发者_开发知识库mmand itself to return immediately, not "block" the terminal.
Obviously, my syntax above doesn't work. What does?
I've written a Perl program that can do this, but surely tcsh can do it natively?
You may be able to do something like (untested):
while (! $?)
kill -s 0 $!
sleep 1
end
Or take a look at the notify
command. I'm not sure if it would do what you want.
精彩评论