run script on specified tty

Asked by GByte

Hello!

I must print information from ifconfig every 30 sec on specified tty (for example tty9).

I wrote "script" watch -n 2 ifconfig.

How can i run this script on startup of the system on tty9?

Question information

Language:
English Edit question
Status:
Solved
For:
upstart Edit question
Assignee:
No assignee Edit question
Solved by:
GByte
Solved:
Last query:
Last reply:
Revision history for this message
Michael Goetze (mgoetze) said :
#1

Just use normal shell redirection, for instance

script
exec > /dev/tty9
watch -n 30 ifconfig
end script

Of course, you'll have to make sure not to run it before /dev/tty9 becomes available.

Revision history for this message
GByte (gbyte) said :
#2

Thank you!
it is work :)