-----BEGIN PGP SIGNED MESSAGE-----
Richard Elliot wrote:
> Thanks for the help.
> Would this be correct?
> while true; do screen -S 19268 -X stuff "signon"\012; sleep 1m; done
Ah; actually, I don't believe octals are interpreted from the
commandline (a shortcoming, IMO). Anyway, to get them to screen you'd
need to put them in single quotes.
You'll have to send the literal character; the following adaptation
while true; do screen -S 19268 -X stuff $'signon\n'; sleep 60; done
If you don't have a shell that supports the non-standard $'...' syntax,
while true; do screen -S 19268 -X stuff \
"$(printf '%b' 'signon\015')"; sleep 60; done
Note that I used carriage return instead of newline; the shell
automatically removes trailing newlines from command substitutions.
Terminals are typically set up to treat carriage returns and newlines
the same (actually, I believe they accomplish this by transforming
newlines into carriage returns).
Micah J. Cowan
Programmer, musician, typesetting enthusiast, gamer.
GNU Maintainer: wget, screen, teseq
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
-----END PGP SIGNATURE-----
screen-users mailing list