[Date Prev] [Date Index] [Date Next] [Thread Prev] [Thread Index] [Thread Next]

Re: Commandline test to see if a serial connection is up

Bryan Stansell bryan@conserver.com
Tue, 26 Apr 2005 17:30:07 -0700 (PDT)


you can also do very simple things like:

(echo '^M^Ec.'; sleep 4) | console foo > output

at least, it worked the last time i tried it.  obviously, it's less than
elegant.  probably only really useful for quick command-line hacks.  for
anything serious or reliable, do what bill said and use something like
expect.

Bryan

On Tue, Apr 26, 2005 at 08:08:15PM -0400, Bill Sommerfeld wrote:
> On Tue, 2005-04-26 at 18:50, Stever wrote:
> > Is there any way from commandline to send a carriage return to a console 
> > and see if I get some sort of response back? I can write a script to 
> > handle the details, but I just want to know if I can execute read/write 
> > commands to the "console" program from commandline so I can put it in a 
> > script.
> 
> Look for a package called "expect"; it's great for scripting this sort
> of thing.