LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices

Reply
 
Search this Thread
Old 06-16-2004, 06:42 PM   #1
tjt
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, 12:21 AM   #2
mascdman
Member
 
Registered: Jun 2004
Location: Canada
Distribution: Ubuntu 6.06 LTS
Posts: 152

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


Reply


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 08:35 PM
reading data from a serial port mchitrakar Linux - Networking 3 12-04-2004 01:24 PM
accessing data from serial port PrerakParikh Linux - Hardware 2 08-24-2004 10:17 PM
Serial Port read in shell script tjt Linux - Newbie 1 08-12-2004 09:18 AM
shell script: sending data through the serial port funkymunky Programming 2 06-09-2004 11:47 PM


All times are GMT -5. The time now is 03:06 AM.

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