Re: bash: problem with [sets]

2003-06-24 Thread Georg Nikodym
On Mon, 23 Jun 2003 23:48:10 +0100 Colin Watson <[EMAIL PROTECTED]> wrote: > On Mon, Jun 23, 2003 at 03:37:43PM -0500, matt zagrabelny wrote: > > On Mon, 2003-06-23 at 13:57, David selby wrote: > > > If this is the case, how can I test a string ? > > > > for your enjoyment: > > > > #!/bin/bash >

Re: bash: problem with [sets]

2003-06-24 Thread Shawn Lamson
On Tue, June 24 at 8:03 AM EDT David selby <[EMAIL PROTECTED]> wrote: > Colin Watson wrote: > > >On Mon, Jun 23, 2003 at 07:57:07PM +0100, David selby wrote: > > > > > >>My bash masterpeice is almost complete ... I have one last problem > >that >no matter how many "" or '' I use I cannot get a

Re: bash: problem with [sets]

2003-06-24 Thread David selby
Colin Watson wrote: On Mon, Jun 23, 2003 at 07:57:07PM +0100, David selby wrote: My bash masterpeice is almost complete ... I have one last problem that no matter how many "" or '' I use I cannot get around. I need to use an if...then construct to check that my 4 digit date field is 4 numeri

Re: bash: problem with [sets]

2003-06-23 Thread Colin Watson
On Mon, Jun 23, 2003 at 07:57:07PM +0100, David selby wrote: > My bash masterpeice is almost complete ... I have one last problem that > no matter how many "" or '' I use I cannot get around. > > I need to use an if...then construct to check that my 4 digit date field > is 4 numerical digits.Thi

Re: bash: problem with [sets]

2003-06-23 Thread Colin Watson
On Mon, Jun 23, 2003 at 03:37:43PM -0500, matt zagrabelny wrote: > On Mon, 2003-06-23 at 13:57, David selby wrote: > > If this is the case, how can I test a string ? > > for your enjoyment: > > #!/bin/bash > > if echo $fourdig | grep ^[0-9]*$ > /dev/null 2>&1; then That *really* needs some quo

Re: bash: problem with [sets]

2003-06-23 Thread matt zagrabelny
On Mon, 2003-06-23 at 13:57, David selby wrote: > My bash masterpeice is almost complete ... I have one last problem that > no matter how many "" or '' I use I cannot get around. > > I need to use an if...then construct to check that my 4 digit date field > is 4 numerical digits.This is for erro

bash: problem with [sets]

2003-06-23 Thread David selby
My bash masterpeice is almost complete ... I have one last problem that no matter how many "" or '' I use I cannot get around. I need to use an if...then construct to check that my 4 digit date field is 4 numerical digits.This is for error checking. I thought [sets] was the way to go if