I am writing a (test) shell script to dump the temps reported by several 
sensors to my LCD, but I think it's trying to display the CR/LF at the 
end. When I change the message to something via OWhttpd it works fine 
(no trailing char), but echoing something to the message file via OWFS 
it seems to add a char at the end that seems to be non-printable.

Should I be doing this differently (instead of echoing it) or can we add 
apply a filter to the text sent to the message & screen files so that 
non-printable chars are stripped & not displayed?

-Scott

Here's my script:
------------------------
#!/bin/sh
cd /home/scott/ow/uncached
while :
do
temp1=10.225F0=`cat uncached/10.225FB6000800/temperature | sed 's/^[ 
\t]*//; s/[:cntrl:]//'`F
#This doesn't work to strip CR/LF either
# temp1=10.225F0=`cat uncached/10.225FB6000800/temperature | sed 's/^[ 
\t]*//; s/\n//'`F
echo $temp1
# echo "10.225F0=`cat uncached/10.225FB6000800/temperature|sed 's/^[ 
\t]*//'`F"
echo "$temp1" >> 29.6EA701000000/LCD_H/message
# echo $temp1 >> 29.6EA701000000/LCD_H/message
echo " "
sleep 2
echo "28.F7668=`cat uncached/28.F76689000000/temperature|sed 's/^[ 
\t]*//'`F"
echo "28.F7668=`cat uncached/28.F76689000000/temperature|sed 's/^[ 
\t]*//'`*F" \
 > 29.6EA701000000/LCD_H/message
echo "---"
sleep 2
done

----------------
STD Output is:
----------------
10.225F0=71.0375F

28.F7668=70.7F
---
10.225F0=71.0375F

28.F7668=70.8125F
---
.......
-----------------------
LCD outout example:
-----------------------

10.225F0=71.0375F█

(the last character is really alternating on/off horizontal bars)


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers

Reply via email to