[TriLUG] Making a bg'd bash script wait for user intervention
Michael Thompson
thompson at easternrad.com
Tue Oct 19 08:03:28 EDT 2004
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Heh, I was thinking the same thing...
Pat Regan wrote:
| On Mon, 18 Oct 2004, Brian Henning wrote:
| 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 could also write a script that either starts the new screen session
if one isn't already running, or re-connects you to the currently
running session, to make it easy for other users or backup operators...
| 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
|
Yip.
Another 2 cents... :)
- --mike
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (Darwin)
iD8DBQFBdQJsuxlRkoWKZoMRAoxKAJ9PN+AhRvCnCCTeqbjaHPigicv9zQCeOak3
tZfmnomEUzijvq4E0kbUqpc=
=+lpe
-----END PGP SIGNATURE-----
More information about the TriLUG
mailing list