a bash scripting question

Michael Damien Curran mick at jantrid.net
Wed Aug 6 19:10:42 EDT 2003


Hi,
Simply just use the variables $1 and $2.
In bash there is no difference between integers and strings.
Just for interest sake, $0 is the file name of the script ... how it was
called.
e.g.
AddTwoNumbers 3 4
$0 has a value of "AddTwoNumbers"
$1 contains 3
and $2 contains 4
Hope this helps
Mick

On Wed, Aug 06, 2003 at 05:24:32PM -0500, Gregory Nowak wrote:
> Hi all.
> 
> Can someone please tell me how to write a bash script that would accept 2
> arguments from the command line, where the first argument would be an
> integer like 1234567, and the second argument would be a text string?
> I would then like to be able to access the variables inside the script
> via $VAR1 and $VAR2.
> 
> Thanks for any help.
> 
> Greg
> 
> 
> -- 
> Free domains: http://www.eu.org/ or mail dns-manager at EU.org
> 
> 
> _______________________________________________
> Speakup mailing list
> Speakup at braille.uwo.ca
> http://speech.braille.uwo.ca/mailman/listinfo/speakup
> 

-- 
---
Michael D. Curran
WWW: http://redgum.bendigo.latrobe.edu.au/~mdcurran/
Email: mick at jantrid.net
MSN: mick at jantrid.net
AOL: manchi2003
Yahoo: manchi20032000
ICQ UIN: 113763334




More information about the Speakup mailing list