Re: how to write this in bash

2012-03-28 Thread mhenn
Am 05.08.2011 17:47, schrieb Maverick: > I also tried already > > $CMD || echo 'Error...' && exit -1 see man bash | less -p Compound $CMD || { echo 'Error...'; exit -1; }

Re: what is wrong here?

2012-03-28 Thread mhenn
Am 08.08.2011 15:22, schrieb Francky Leyn: > On 8/8/2011 2:17 PM, mhenn wrote: >> Am 08.08.2011 11:33, schrieb Francky Leyn: >>> Hello, >>> >>> consider the following code: >>> >>> EXTENSION=jpg >>> INPUT_FILES=*.$EXTENSI

Re: what is wrong here?

2012-03-28 Thread mhenn
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: <ht

Re: what is wrong here?

2012-03-28 Thread mhenn
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