[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
[K12OSN] Re: OT: bash help
- From: "Peter Hartmann" <ascensiontech gmail com>
- To: "Support list for open source software in schools." <k12osn redhat com>
- Subject: [K12OSN] Re: OT: bash help
- Date: Sat, 8 Mar 2008 12:16:32 -0500
Ok so this works in ksh:
if [ ! -d "/home/vpopmail/domains/ascensionschoolnyc.org/"$name"/Maildir/."[Ss][Pp][Aa][Mm]""
];
Why not bash?
Peter
On Sat, Mar 8, 2008 at 12:01 PM, Peter Hartmann <ascensiontech gmail com> wrote:
> I'm trying to test if vpopmail users have a spam folder already, but
> I'd like to make the directory test case insensitive.
>
> snip:
>
> if [ ! -d "/home/vpopmail/domains/domain.com/$name/Maildir/.[Ss][Pp][Aa][Mm]" ];
> then
> echo not there
> fi
>
> This way the test fails even if there is a .spam folder.
>
> Without the quotes the regex is interpreted but when the directory is
> there, I get a 'binary operator expected' error for the 'if' line.
>
>
> What am I not getting?
>
> Thanks,
> Peter
>
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]