From owner-freebsd-questions Wed Jun 13 22:38:42 2001 Delivered-To: freebsd-questions@freebsd.org Received: from mail.ideal.net.au (ion.ideal.net.au [203.20.241.5]) by hub.freebsd.org (Postfix) with ESMTP id ABD0A37B40A for ; Wed, 13 Jun 2001 22:38:35 -0700 (PDT) (envelope-from chris@ideal.net.au) Received: from helium.ideal.net.au (helium.staff.ideal.net.au [202.3.35.2]) by mail.ideal.net.au (8.9.3/8.9.3) with ESMTP id PAA00664 for ; Thu, 14 Jun 2001 15:36:03 +1000 (EST) (envelope-from chris@ideal.net.au) Message-Id: <5.1.0.14.2.20010614152911.0298c728@mail.ideal.net.au> X-Sender: chris@mail.ideal.net.au X-Mailer: QUALCOMM Windows Eudora Version 5.1 Date: Thu, 14 Jun 2001 15:38:25 +1000 To: FreeBSD-questions@FreeBSD.ORG From: Chris Aitken Subject: Keyboard Keystroke in a Shell Script In-Reply-To: <550B4D6FA776D3118D1D00902799170C6086AD@CQOS1> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hi all, I got a bit of a curley one that I cant seem to find any answers..... Im writing a shell script (or possibly a perl script... depending on how it needed to be implimented) and im very much a novice at this stuff. What this script is doing, is accessing a device hanging off the serial port of a FreeBSD 3.4 box. Im using cu to access the port, and I can issue the required commands on the command line no dramas. What I want to do is write a script which will excecute cu in the command line, issuing the needed lines of data and get out. Here is an example of how I would be accessing the device..... ----------- % cu -l /dev/cuaa1 -s 38400 ABCD1234 Hello, this is a sentence ----------- How do I issue the and the keyboard strokes to cu in a script? Im pretty sure I can work out how to send the required commands and text, but the keyboard strokes are bugging me. Any help would be great.... Thanks Chris -- Chris Aitken - Webmaster/Database Designer - IDEAL Internet email: chris@ideal.net.au phone: +61 2 4628 8888 fax: +61 2 4628 8890 -------------------------------------------- If the foo shits, call your sysadmin To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message