run script on specified tty

Asked by GByte on 2009-09-09

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:
2009-09-22
Last query:
2009-09-22
Last reply:
2009-09-19
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.

GByte (gbyte) said : #2

Thank you!
it is work :)