Results 1 to 3 of 3
Thread: screen - tail box
Enjoy an ad free experience by logging in. Not a member yet? Register.
- Join Date
- May 2010
screen - tail box
From a shell script I would like to display the output of tail -f. While doing this, I want to restrict the output to the last 15lines of my screen only (and allow it to overwrite itself).
I thought of using curses to define my own window - however initscr() call wipes out the entire screen first.
The 'screen' utility looks promising, I can split the screen using Ctr+a S. However how do I do this programmatically while invoking screen itself?
I would like to invoke my main shell script as well as this 'tail box' (if I can call it that, without offending 'dialog' users)....
Any help is greatly appreciated!
How about something like
xterm -geometry 80x15 -e 'tail -f /var/log/yourfile'Stuff happens. Then stays happened.
- Join Date
- Jan 2005
- Saint Paul, MN
xterm -geometry 80x15 -sl 15 -e tail -f /var/log/messages &
Other geometry options include placement information:
Note that the "+" can be a "-" for from bottom or right edges rather than from the top and left edges.
Also note that KDE and Gnome still have this options (which is slightly modified do that all applications use screen real estate width and heights and the format is changed.
Also note in all cases the +x+y can be used without the widthxheight portion.