bug-bash
[Top][All Lists]
Advanced

[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 14:17, schrieb mhenn:
> Am 08.08.2011 11:33, schrieb Francky Leyn:
>>[...]
> 
> echo "$INPUT_FILES" #obviously wrong
> #instead maybe
> INPUT_FILES="$(ls *.$EXTENSION)"
> 
>> [...]

That actually wasn't such a good advice:
<http://mywiki.wooledge.org/ParsingLs>

Better use find or or a for loop like this:

for file in *.$EXTENSION; do
        ...
        #but attention here: if no such a file exists,
        # $file is "*.jpg" (with a literal asterisk)

        #maybe break after the first found file?
done


reply via email to

[Prev in Thread] Current Thread [Next in Thread]