Sponsored Content
Top Forums UNIX for Dummies Questions & Answers shell script - loop to countdown Post 11127 by Perderabo on Thursday 29th of November 2001 09:45:28 AM
Old 11-29-2001
We're really not supposed to help folks with homework assignments on this board. But you've done most of the work and you're stuck on a very tricky problem.

if [ -n $x ]

will not work, If there is nothing in x the command becomes:

if [ -n ]

So you need to use

if [ -n "$x" ]

Now when threre's nothing in x, the command becomes

if [ -n "" ]
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

If then else loop in Shell script

Hi Following is the code . When I give input as Bangalore,its dospalying Welcome to Hitech City. But say , if I select Delhi or US, its not displaying the corresponding message. Its still says Welcome to Hitech City. Seems that it not entering in the elif part. Please suggest. #!... (4 Replies)
Discussion started by: pankajkrmishra
4 Replies

2. Shell Programming and Scripting

Display runnning countdown in a bash script?

I am looking for a way to display on a single line, a running countdown for a given amount of time in a terminal using a bash script. I am looking for this to use as part of a larger bash script that captures Video. The script sets up a bunch of parameters for DVgrab, and one of the parameters... (11 Replies)
Discussion started by: Starcast
11 Replies

3. Shell Programming and Scripting

Help with loop in a shell script

I just want to write a little script, that reads the lines from a file, echos somthing in a new tmp.file and then do some commands whith the tmp.files. while read -r line do echo "TEST=" > tmp.$$ echo "$line" >> tmp.$$ any_command < tmp.$$ done < $INPUTFILE But I think I have to... (2 Replies)
Discussion started by: elifchen
2 Replies

4. Shell Programming and Scripting

Stop! (the countdown!) :-) shell script help

Hi guys, I've found two nifty little scripts on these forums one which detects if the F5 key has been pressed: #/bin/sh _key() { local kp ESC=$'\e' _KEY= read -d '' -sn1 _KEY case $_KEY in "$ESC") while read -d '' -sn1 -t1 kp do _KEY=$_KEY$kp ... (0 Replies)
Discussion started by: rich@ardz
0 Replies

5. Shell Programming and Scripting

Shell script using loop

Hi everyone, I have n number of data in my file "temp" in following order.In each line table_name and column_name are different.input data is in same format each query in three lines. ALTER TABLE table_name ADD ( column_name1 VARCHAR2(10), column_name2 VARCHAR2(70) ); ... (23 Replies)
Discussion started by: alisha
23 Replies

6. UNIX for Dummies Questions & Answers

shell scripting - gives a message on Fridays and a countdown on other business days.

Hey - I need to write a shell script that gives a message on Fridays and a countdown on other business days. ("Today is Thursday, one day to go to Friday") I don't know if I should be scheduling a job for friday using the crontab command? Basically i'm totally lost. Any help would be greatly... (6 Replies)
Discussion started by: citizencro
6 Replies

7. Shell Programming and Scripting

Anyone know of any FUN countdown script

Hi all, Does anyone know of any FUN countdown script that I can use for my script? At the moment, am just using sleep 10 or more and then print stuff into the screen to allow more time for the user to decide whether they want to continue running the script or abort? Just thought of wanting... (3 Replies)
Discussion started by: newbie_01
3 Replies

8. Shell Programming and Scripting

Help with the For loop shell script

Hi, I have multiple files in a directory. Each file will have a header.I have to check if any of the files has 0 rows other than the header then I have to delete the files. Here “ Empty file” in my case means a file has header information but no data. I have to delete such files. If the file... (2 Replies)
Discussion started by: ganesnar
2 Replies

9. Shell Programming and Scripting

Loop in shell script

Hi Friends, I have a file. the content is as below: file1: /A/B/C/abc.txt 2013-07-28 13:50:00,2013-07-31 01:00:00,5,710 /A/B/C/xyz.txt 2011-09-21 18:30:00,2013-07-30 06:15:00,15,65135 2009-11-09 18:00:00,2011-09-02 09:00:00,5,12345 2013-07-28 13:50:00,2013-07-31 01:00:00,5,710 ... (2 Replies)
Discussion started by: vsachan
2 Replies

10. Shell Programming and Scripting

Perl script countdown

In the below bash when the perl is it possible to hide the commands from running on screen and display a process countdown? For example, on the cygwin screen now the user sees each process in the command running as running protocol refGene, running protocol popfreq_all, etc... Could a... (0 Replies)
Discussion started by: cmccabe
0 Replies
IE(4)							 BSD/i386 Kernel Interfaces Manual						     IE(4)

NAME
     ie -- Ethernet device driver

SYNOPSIS
     To compile this driver into the kernel, place the following line in your kernel configuration file:

	   device ie

     Alternatively, to load the driver as a module at boot time, place the following line in loader.conf(5):

	   if_ie_load="YES"

     In /boot/device.hints:
     hint.ie.0.at="isa"
     hint.ie.0.port="0x300"
     hint.ie.0.irq="5"
     hint.ie.0.maddr="0xd0000"

HARDWARE
     The ie driver provides supports the following 8 and 16bit ISA Ethernet cards that are based on the Intel i82586 chip:

     o	 3COM 3C507
     o	 AT&T EN100
     o	 AT&T Starlan 10
     o	 AT&T Starlan Fiber
     o	 Intel EtherExpress 16
     o	 RACAL Interlan NI5210

DIAGNOSTICS
     ie%d: unknown board type code %d  An i82586 chip was found, but the driver was unable to determine the actual board type during the probe.

     ie%d: kernel configured maddr %x doesn't match board configured maddr %x  The device probe detected a different maddr than the one specified
     in the kernel configuration file.

     ie%d: can't find shared memory  The device probe could not access the shared memory to determine its size.

     ie%d: kernel configured msize %d doesn't match board configured msize %d  The device probe found a different size for the shared memory than
     the one specified in the kernel configuration file.

     ie%d: kernel configured irq %d doesn't match board configured irq %d  The device probe detected that the board is configured for a different
     interrupt than the one specified in the kernel configuration file.

     ie%d: reset  The Intel i82586 had to be reset by the driver.

     ie%d: transceiver problem	The driver has detected a problem with the Ethernet transceiver.  This is usually due to a loose or broken trans-
     ceiver cable when using an external transceiver.  When you experience this problem with an on-card transceiver your card may be incorrectly
     jumpered for to use an external transceiver.  Worst case your on-board transceiver may be broken.

     ie%d: TDR detected an open %d clocks away	The driver detected an open circuit in the Ethernet cable.  Check your coax cable and terminator
     resistors.

     ie%d: TDR detected a short %d clocks away	The driver detected a short circuit in the Ethernet cable.  Check your coax cable and terminator
     resistors.

     ie%d: TDR returned unknown status %x  The driver got an unknown status from the card during the Ethernet cable test.

     ie%d: multicast address setup command failed  The card could not be put into multicast mode.

     ie%d: configure command failed  The card refused to respond correctly during configuration.

     ie%d: individual address setup command failed  The programming of the Ethernet (MAC) address failed.

CAVEATS
     The Racal Interlan NI5210 comes in variants with 8 and 16 kbytes of shared memory.  It is strongly advisable to use the 16 kbyte variant.
     You can upgrade your 8 kbyte card to 16 kbyte by adding an additional RAM chip.

SEE ALSO
     arp(4), netintro(4), ng_ether(4), ifconfig(8)

AUTHORS
     The ie device driver was written by Garrett A. Wollman, based on code by William F. Jolitz and Lawrence Berkeley Laboratories.  3C507 support
     was written by Charles M. Hannum.	This manual page was written by Wilko C. Bulte.

BSD								   July 16, 2005							       BSD
All times are GMT -4. The time now is 07:48 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy