[TriLUG] Making a bg'd bash script wait for user intervention
Pat Regan
thehead at patshead.com
Tue Oct 19 01:21:09 EDT 2004
On Mon, 18 Oct 2004, Brian Henning wrote:
> Hi Y'all,
Hi!
> 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?
>
What about running the script inside of a screen session?
screen -d -m -S SomeKindOfName runme.sh
The -d -m detaches the session and the -S gives the session a name. Then,
whenever you want to check on it, you can do:
screen -dr SomeKindOfName
You can deteach again by hitting C-a d.
Then you can use 'read' in your script to wait for user input, like
someone else suggested.
Pat
More information about the TriLUG
mailing list