Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Mon 25 May 2015, 01:40
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
Tailbox text handling
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 1 of 1 Posts_count_1  
Author Message

Joined: 03 Apr 2007
Posts: 3419
Location: Oregon

PostPosted: Tue 27 Oct 2009, 18:58    Post_subject:  Tailbox text handling
Sub_title: Formatting text befor display in tailbox window

I got tailing to work after a fashion.
But I am having a problem with output from an external program that overwrites some lines it displays.
The output to the tailbox window currrently shows all lines individually rather than overwriting some as it should.
What should I change in this sample program?


export TITLE="Test run"
export TAILFILE=/tmp/mine
ufiformat -v /dev/sde> $TAILFILE&
#mkdosfs -v -I /dev/sde&> $TAILFILE
echo 99 > /tmp/tailbox_progress
echo " " > /tmp/tailbox_text

tailing (){
   I=`cat /tmp/tailbox_progress`
   echo $TITLE
   echo $I
   sleep 1
   [ -s "$TAILFILE" ] && tail -n 20 "$TAILFILE" | tr '\r' '\n' | tail -n 20 > /tmp/tailbox_text
   echo 100 > /tmp/tailbox_progress
export -f tailing

export tailbox="
<window title=\"tailbox\">
   <input>"'while [ A != B ]; do tailing; done'"</input>
   <action>echo 99 > /tmp/tailbox_progress</action>
   <input file>/tmp/tailbox_text</input>

I=$IFS; IFS=""
for STATEMENTS in $(gtkdialog3 -p tailbox); do
Back to top
View user's profile Send_private_message 
Display_posts:   Sort by:   
Page 1 of 1 Posts_count_1  
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » Off-Topic Area » Programming
Jump to:  

You cannot attach files in this forum
You can download files in this forum

Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0394s ][ Queries: 12 (0.0048s) ][ GZIP on ]