Sponsored Content
Top Forums Shell Programming and Scripting Help it works but its to SLOW Post 302178790 by era on Wednesday 26th of March 2008 10:19:55 AM
Old 03-26-2008
Quote:
Originally Posted by Garlandxj
Code:
echo "$device,$routername,$dns,$answer,$snmpread,$snmpwrite,$interface" >> device.log
echo "$device,$routername,$dns,$answer,$snmpread,$snmpwrite,$interface"

Oh, and to reduce code duplication, you could use "tee -a device.log" here. Also, since this recurs a number of times, maybe you could break it out into its own little function. That would be my main stylistic suggestion actually -- see which parts you could modularize into functions.
 

8 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

slow ftp

On one of of solaris 7 boxes whenever i telnet or ftp it takes sometime before i get the prompt...any quick ideas where I should look...Thanks (3 Replies)
Discussion started by: suntan
3 Replies

2. Post Here to Contact Site Administrators and Moderators

Slow

The site has gone slow for quite some time... Can you do somethin abt it (2 Replies)
Discussion started by: DPAI
2 Replies

3. SCO

Slow cd response

Hi All We have one SCO Server here and it never gives us any trouble. Until Now!! Well its not earth shattering but we have one user who is complaining of a very slow response time when changing to his Home Directory. Other users who have similar profiles are OK. I have su'd to this user and I can... (0 Replies)
Discussion started by: JohnOB
0 Replies

4. UNIX for Dummies Questions & Answers

scp is slow

All of the sudden scp got really slow ... from 2-3 seconds to 30 seconds. This happened for 5 hours, and then it went back to running fast. Why? If I use the -q qualifier which "Disables the progress meter" could this have any adverse effect? Thanks (1 Reply)
Discussion started by: tomstone_98
1 Replies

5. UNIX for Dummies Questions & Answers

How ls | wc -l works?

ls displays files in tabbed output. Say a directory contains 3 files. ls will list all 3 in one line. So, I expect ls | wc -l to give 1, but it counts the nr of files and gives 3. Can someone explain how this works? (3 Replies)
Discussion started by: krishmaths
3 Replies

6. Programming

how this works?

pls explain me how this works.... DECODE (SUBSTR (field, 1, 1),'''', '''''' || field || '''','''' || field || '''') here field is a column in an oracle table.... (7 Replies)
Discussion started by: vijay_0209
7 Replies

7. UNIX for Dummies Questions & Answers

>./a.pl works, >a.pl - does not

When I try to execute script, I get message: >aa.pl zsh: command not found: aa.pl but >./aa.pl works OK. What to change in environment to force the former way to work? Thank you, Alex Z (4 Replies)
Discussion started by: zzol
4 Replies

8. UNIX for Advanced & Expert Users

How this works?

I have a program............ #include<stdio.h> #include<unistd.h> main() { if(fork == 0) { printf("Hi every body:p!!!!!!!!!!"); } } This program works with out any error. here fork is not a system call. It just act as a variable.But how it works without declaring it? What data type it... (19 Replies)
Discussion started by: carolsanjeevi
19 Replies
UHSO(4) 						   BSD Kernel Interfaces Manual 						   UHSO(4)

NAME
uhso -- support for several HSxPA devices from Option N.V. SYNOPSIS
The module can be loaded at boot time by placing the following line in loader.conf(5): uhso_load="YES" DESCRIPTION
The uhso driver provides support for several HSxPA devices from Option N.V. that are based on their packet interface. Each device has a set of serial ports and a raw IP packet interface. The serial ports of the device are accessed through the ucom(4) driver which makes them behave like tty(4) devices. The packet interface is exposed as a network interface. Establishing a connection on the packet interface is achieved by using the proprietary AT commands ``AT_OWANCALL'' and ``AT_OWANDATA'' on any of the available serial ports. The network interface must be configured manually using the data obtain from these calls. Each device usually have at least two or more serial ports, their individual purpose can be identified through sysctl(8). Ports identified as ``Modem'' features a normal modem interface that can be used with PPP. Ports identified as ``Diagnostic'' uses a proprietary binary interface used for firmware upgrades, this port does not have a AT command interface and can not be used to control the device. Other ports features an AT command interface that can be used for normal device control. HARDWARE
The uhso driver should work with most devices from Option. The following devices have been verified to work o Option GlobeSurfer iCON 7.2 (new firmware) o Option iCON 225 o Option iCON 452 o Option iCON 505 The device features a mass storage device referred to as ``Zero-CD'' which contains drivers for Microsoft Windows; this is the default mode for the device. The uhso driver automatically switches the device from ``Zero-CD'' mode to modem mode. This behavior can be disabled by setting hw.usb.uhso.auto_switch to 0 using sysctl(8) EXAMPLES
Establishing a packet interface connection using the AT command interface available at one of the serial ports AT+CGDCONT=1,,"apn.provider" AT_OWANCALL=1,1,1 OK _OWANCALL=1,1 AT_OWANDATA=1 _OWANDATA: 1, 10.11.12.13, 0.0.0.0, 10.2.3.4, 10.2.3.5, 0.0.0.0, 0.0.0.0, 72000 Configuring the interface ifconfig uhso0 10.11.12.13 up route add default -interface uhso0 echo "nameserver 10.2.3.4" > /etc/resolv.conf echo "nameserver 10.2.3.5" >> /etc/resolv.conf The connection can be terminated with AT_OWANCALL=1,0,1 FILES
/dev/cuaU?.? SEE ALSO
ucom(4), usb(4) AUTHORS
The uhso driver was written by Fredrik Lindberg <fli@shapeshifter.se>. BSD
January 14, 2010 BSD
All times are GMT -4. The time now is 11:12 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy