[TriLUG] Making a bg'd bash script wait for user intervention

Brian Henning brian at strutmasters.com
Mon Oct 18 15:09:35 EDT 2004


Hi Y'all,
  I'm working on a set of scripts for backups, and I've hit a snag in a
script that burns images to CDs.  I need it to wait for user intervention in
certain situations (no CD in drive, CD not blank, swap CDs now, etc).  I've
got the various conditions mapped out in the script; all I need is a way to
make it wait for me to say "go", basically.  The trick is that the process
may be backgrounded, so it can't be simply waiting for Enter on stdin (or
can it?).  I tried suspend, but I get
suspend: cannot suspend: no job control

Is there another simple method to make a bash script wait for a signal?  Or
else, what do I need to do to make suspend work?

Thanks muchly,
~Brian

----------------
Brian A. Henning
Strutmasters.com
866.597.2397
----------------





More information about the TriLUG mailing list