Re: BASH script arguments
From: Grant Edwards (grante_at_visi.com)
Date: 10/02/04
- Next message: Alan Connor: "Re: EarthLink spamBlocker - how rude"
- Previous message: Chris F.A. Johnson: "Re: BASH script arguments"
- In reply to: Dale Bourne: "BASH script arguments"
- Next in thread: Juhan Leemet: "Re: BASH script arguments"
- Reply: Juhan Leemet: "Re: BASH script arguments"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 02 Oct 2004 00:58:14 GMT
On 2004-10-01, Dale Bourne <dbourne@chartertn.net> wrote:
> I'm new to scripting. I've learned quite a bit following the
> newsgroups, and online tutorials. Still have a long way to go.
>
> How can I determine if a commandline argument is an integer?
if expr "$1" : '[0-9][0-9]*$' >/dev/null; then
echo "integer"
fi
--
Grant Edwards grante Yow! Mr and Mrs PED, can I
at borrow 26.7% of the RAYON
visi.com TEXTILE production of the
INDONESIAN archipelago?
- Next message: Alan Connor: "Re: EarthLink spamBlocker - how rude"
- Previous message: Chris F.A. Johnson: "Re: BASH script arguments"
- In reply to: Dale Bourne: "BASH script arguments"
- Next in thread: Juhan Leemet: "Re: BASH script arguments"
- Reply: Juhan Leemet: "Re: BASH script arguments"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|