Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 06-16-2004, 07:42 PM   #1
LQ Newbie
Registered: Jun 2004
Posts: 9

Rep: Reputation: 0
Why can't I read in data from the serial port using a bash script?

I'm trying to log any data coming over the serial port. I'm trying this:

% /dev/ttyS0/ > logfile

But it ain't working. I can write to the serial port ok, so I know that is all set up correctly. Does anyone know how to do this?

By the way, I'm doing this in a shell script, so I can't use minicom or any other terminal utility like that.
Old 06-17-2004, 01:21 AM   #2
Registered: Jun 2004
Location: Canada
Distribution: Ubuntu 6.06 LTS
Posts: 152

Rep: Reputation: 30
   tail -f /dev/ttyS0 >logfile


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
is there any shell command to read and write data from parallel and serial port? baosheng Linux - Hardware 2 01-13-2007 09:35 PM
reading data from a serial port mchitrakar Linux - Networking 3 12-04-2004 02:24 PM
accessing data from serial port PrerakParikh Linux - Hardware 2 08-24-2004 11:17 PM
Serial Port read in shell script tjt Linux - Newbie 1 08-12-2004 10:18 AM
shell script: sending data through the serial port funkymunky Programming 2 06-10-2004 12:47 AM

All times are GMT -5. The time now is 05:50 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration