[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: what is wrong here?
From: |
mhenn |
Subject: |
Re: what is wrong here? |
Date: |
Wed, 28 Mar 2012 18:25:24 -0000 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.18) Gecko/20110617 Thunderbird/3.1.11 |
Am 08.08.2011 11:33, schrieb Francky Leyn:
> Hello,
>
> consider the following code:
>
> EXTENSION=jpg
> INPUT_FILES=*.$EXTENSION
echo "$INPUT_FILES" #obviously wrong
#instead maybe
INPUT_FILES="$(ls *.$EXTENSION)"
>
> if [ -z "$INPUT_FILES" ]; then
> echo "No .$EXTENSION input files in this directory"
> exit -1
> fi
>
[...]
>
> What is wrong here?
>
> Best regards,
>
> Francky Leyn
I think there are even better ways to do this, but this is one that came
to my mind at the moment.
btw:
man bash | less -p 'Pathname expansion'