Sponsored Content
Top Forums Shell Programming and Scripting Help with 56kbit Modem Scripting Post 302999853 by Corona688 on Wednesday 28th of June 2017 05:03:22 PM
Old 06-28-2017
Quote:
Originally Posted by krustowski
Thank you both for reply! Unfortunately, I am not quite sure how to use the exec command. It seems like that the tother method (<>) is quite useful, but I have no idea how can I write to the log continuously.
You use it like I show it, basically. It's among other things the shell's "open a file" setting. Here I use it to open file descriptor 5, in read-write <> mode.

File descriptors 0, 1, and 2 are standard in, standard out, and standard error, respectively. Numbers 3 and up are generally not opened yet in a shell and can be used as you please.

Code:
exec 6<inputfile # Open file for read
read LINE <&6 # Read a line from it
exec 6<&- # Close file

exec 7>logfile # open a file for write
echo asdf > &7 # Write to file
exec 7>&- # Close file

Does my code not work, or not fulfill your purpose? What is your question?
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Modem on HP-UX 10.20

Hi everyone I am having some real difficulties getting a dial in modem to work on one of my HP boxes. It's a mux modem on port 7 which I have set up at 9600 baud. I can dial in, the handshakes are completed, but then it returns incoherent characters on the emulation screen. I think my dial in... (1 Reply)
Discussion started by: alwayslearningunix
1 Replies

2. UNIX for Advanced & Expert Users

Modem

I've spent enough time trying to put on work Lucent Winmodem in my armada M300 (compaq laptop) I use Mandrake 8.0 but as soon as i get connected and prompmts appears modem shutsdown. Does any one had a similar situation, solved it? cheers (2 Replies)
Discussion started by: alex blanco
2 Replies

3. UNIX for Dummies Questions & Answers

Modem problem: "Sorry, modem is busy"

Hi! I have a little prob with dialing up to the internet... When I try connect, it says "Sorry, modem is busy"... Specs: Laptop 56K modem Slackware 8.0 Kernel 2.4.5 Cheers;) (4 Replies)
Discussion started by: satan404
4 Replies

4. UNIX for Dummies Questions & Answers

Modem Volume

Specs: Dlink DFE-560EL external modem. RedHat 7.1 How do you turn off the modem volume? I am getting annoyed of it beeping everytime I use it but there is no switch on the hardware to tune down the volume. I have tried using minicom and use the following commands: ATL0 ATM0 Next, I... (2 Replies)
Discussion started by: arz
2 Replies

5. UNIX for Dummies Questions & Answers

Modem

Pleaseee... Helpppp.... !!! I am using SCO Open Server 5.05. Recently, i have upgraded the system which means transfer all apps and data to the new system. Everything work well except one thing. On my old system i have an external modem which to dial out. Now that i use the same modem on... (4 Replies)
Discussion started by: jackpotp
4 Replies

6. UNIX for Dummies Questions & Answers

modem

I have got Suse 8.0 by using a modem (US Robotics 56K Faxmodem Ext). During connection i got the error 16. I tried it under RedHat and Mandrake too.....same problem. What can i do ? Thanx...a lot... Logfile: SuSE Meta pppd (smpppd), Version 0.73 on zuhause. wwwoffle not is running ... (1 Reply)
Discussion started by: Pennywize
1 Replies

7. UNIX for Dummies Questions & Answers

Modem - Test /dev/modem

Ok. I tried following the directions from some of the other threads, but I've hit a road block. I have red hat 7.3 and I installed the hcf package: hcfpcimodem-0.99lnxtbeta03042700k2.4.18_3-1rh.i386.rpm It installed ok, no errors, but I still can't get linux to find my modem. I've tried... (2 Replies)
Discussion started by: lawadm1
2 Replies

8. Solaris

Is the cable you are using a null modem cable or a modem cable

Hi all, Is there any difference between a null modem cable or a modem cable ? i assume that a null modem cable is a normal cable that i used from cpu serial ports to a modem for dialup. please correct if i am wrong, thks (2 Replies)
Discussion started by: waterbear
2 Replies

9. SCO

Installing a MODEM on v5.0.2

Hi, my first Sco question so go easy! We have a customer who is on Sco v5.0.2. We are attempting to talk a consultant on site through how to configure the MODEM in scoadmin. Unfortunately the MODEM install instructions that we work from only work for v5.0.4 and assume that scoadmin has an option... (1 Reply)
Discussion started by: Ric.Hemsley
1 Replies

10. Solaris

Modem

hi folks, i am looking for a analog modem to use it with a solaris9 sparc mashine. as far as i know, solaris communicates with the modem using AT-commands. so do i need a special modem for solaris or just a modem? i am open for everything. PCI-modem, seriell modem, usb modem. what are you using? i... (1 Reply)
Discussion started by: pressy
1 Replies
AIRPORT-MODEM(1)					      General Commands Manual						  AIRPORT-MODEM(1)

NAME
airport-modem - Modem monitoring and hangup utility for the original Apple AirPort Base Station ("Graphite"), the Lucent RG-1000 base sta- tion and the Apple Airport Extreme base station SYNOPSIS
airport-modem DESCRIPTION
airport-modem allows you to monitor the state of the internal modem of your base station and to start/stop the modem connection. On the AirPort Extreme base station, the modem utility can also display the approximate duration of the modem connection. OPTIONS
airport-modem accepts no command-line options. airport-modem is a wrapper script around the AirportBaseStationHangup.jar jar file located in /usr/share/java/airport-utils. You can set the JAVACMD environment variable to use a specific JVM instead of the one chosen by the wrapper script. Set the DEBUG environ- ment variable to 1 to get the debug output from the wrapper script. ENVIRONMENT VARIABLES
DEBUG Set this variable to 1 to get the debug output from the wrapper script. JAVACMD The full path to the Java Virtual Machine to use. By default, the wrapper uses JAVACMD; if it is not set, it looks for JAVA_BINDIR/java, then for JAVA_HOME/bin/java before looking for a java executable in the PATH. In the latter case, the JVM used can be configured using the Debian alternatives system (see update-alternatives(8)). JAVA_HOME The full path where your JDK/JRE is installed. JAVA_BINDIR The full path to the directory where the java executable is located. JAVA_ARGS Extra command-line arguments to be passed to the Java Virtual Machine. AUTHOR
airport-modem was written by Jon Sevy <jsevy@cs.drexel.edu>. This manual page was written by Julien BLACHE <jblache@debian.org>, for the Debian project (but may be used by others). May 20, 2006 AIRPORT-MODEM(1)
All times are GMT -4. The time now is 04:29 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy