If you don't need to use "variable" maybe consider skipping the data
going through bash and allowing *nix power to do the work for you:
cat /dev/ttyS0 >>file.txt
It meets your criteria of working from within the bash shell.
If this doesn't work for you and you still need help please post the
details of how you're configuring the serial port (with stty), which
TS product you're using, etc.
----
Andy
--- In "e.pifferi" <> wrote:
>
> hy i need to acquire data from an item on ttyS0 and save this data on
> a file.txt it's possible to do from bash shell ?
>
> ive tryed so :
>
> read variable < /dev/ttyS0 echo $variable >> file.txt
>
> or so
>
> export variable=`cat /dev/ttyS0 echo $variable >> file.txt
>
> but don't work can anyone help me
>
------------------------------------
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/ts-7000/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/ts-7000/join
(Yahoo! ID required)
<*> To change settings via email:
<*> To unsubscribe from this group, send an email to:
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|