Scripting question?

Ralph W. Reid rreid at sunset.net
Wed Sep 7 15:51:47 EDT 2005


How about 'shift'?  For example:

#!/bin/bash

while [ "$1" != "" ];
do
echo $1
shift
done

HTH, and have a _great_ day.

On Tue, Sep 06, 2005 at 04:10:47PM +0200, Willem van der Walt wrote:
> What is the syntax for refering to $n in a script?
> I want to loop through $1 through $# and am struggeling to refer to, lets 
> say $1 or $3 where n equels 1 or 3.
> TIA
> Willem
> 
> 
> -- 
> This message is subject to the CSIR's copyright, terms and conditions and
> e-mail legal notice. Views expressed herein do not necessarily represent the
> views of the CSIR.
> 
> CSIR E-mail Legal Notice
> http://mail.csir.co.za/CSIR_eMail_Legal_Notice.html 
> 
> CSIR Copyright, Terms and Conditions
> http://mail.csir.co.za/CSIR_Copyright.html 
> 
> For electronic copies of the CSIR Copyright, Terms and Conditions and the 
> CSIR
> Legal Notice send a blank message with REQUEST LEGAL in the subject line to
> HelpDesk at csir.co.za.
> 
> 
> This message has been scanned for viruses and dangerous content by 
> MailScanner, and is believed to be clean.  MailScanner thanks Transtec 
> Computers for their support.
> 
> 
> _______________________________________________
> Speakup mailing list
> Speakup at braille.uwo.ca
> http://speech.braille.uwo.ca/mailman/listinfo/speakup

-- 
Ralph.  N6BNO.  Wisdom comes from central processing, not from I/O.
rreid at sunset.net  http://personalweb.sunset.net/~rreid
...passing through The City of Internet at the speed of light!
SEC (x) / COSEC (x) = (TAN (x) / COTAN (x)) ^ 2




More information about the Speakup mailing list