bash case statement question
xDog Walker
thudfoo at gmail.com
Thu Sep 22 09:19:56 PDT 2011
On Thursday 2011 September 22 07:28, David A. Bandel wrote:
> On Wed, Sep 21, 2011 at 12:51, xDog Walker <thudfoo at gmail.com> wrote:
> > Here is a question about bash: What does the .$1 mean in the following
> > case statement (I know $1 means the first argument, but what does the .
> > mean here?)
> >
> > case .$1 in
>
> note that there is NO space between the "." and the $1, effectively
> concatenating the two.
>
> > and later on:
> >
> > .[aA])
> > SAMPLE="blah";;
>
> again, note that your statement is "dot"[blah] -- again, it matches
> the concatenated . above.
>
> You can remove the "." throughout, it will work the same.
You are so right: I removed the dots and ran the script both with and without
an argument and it ran correctly.
Thanks.
--
I have seen the future and I am not in it.
More information about the Linux-users
mailing list