All pastes #69756 Raw Edit

warnaud

public text v1 · immutable
#69756 ·published 2006-06-23 12:04 UTC
rendered paste body
#!/bin/bash
#
#Change this pipe to reflect yours
pipe="/tmp/logitech-lcd"

while /bin/true;
do
 line1="TM \"*** .__-= [ $(date +'%H:%M:%S') ] =-__. ***\""
 line2="TM \"$(date +'%A %d %B %Y') ($(uptime | sed 's/^.*up //' | sed 's/,.*$//') )\""
 line3="\"($(uname -n)) $(uname -s -r)\""
 line4="\"Load: $(uptime | sed 's/^.*e: //')\""
 line5="\"Mem:$(free -m | grep "+" | cut -b20-40) Swap:$(free -m | grep "Swap:" | cut -b6-40) \""
 #cat /tmp/xmms-info > /tmp/xmms-info-copy
 line6="\"$(cat /tmp/xmms-info | grep 'Title:' | sed 's/Title: //')\""
 #line6="\"$(cat /tmp/xmms-info-copy | grep 'Title:' | sed 's/Title: //') $(cat /tmp/xmms-info-copy | grep 'Position:' | sed 's/Position: //')\""
 lineall=$(echo -e "$line1 $line2 $line3 $line4 $line5 $line6")
 echo $lineall > $pipe
#sleep 60
sleep 1
done;