On Thu, Nov 21, 2002 at 10:57:00AM +0000, Angus Leeming wrote:
> Which is "better"?
>       (cd ${DIRNAME}; ${FDESIGN} -convert ${FDFILE})
> or
>       (cd ${DIRNAME} && ${FDESIGN} -convert ${FDFILE})
> 
>       if [ $? -ne 0 ]; then
>               echo "\"${FDESIGN} -convert ${FDFILE}\" failed. Please investigate."
>               exit 1
>       fi
> 
> I'm not used to the "&&" stuff. can someone explain to me just what it does? 

The same as in C/C++: Run the first command, if that succeeded the second,
if that succeeded return success and failure otherwise.

> Ie, does it interrogate return values? If the first command fails, does it 
> execute the second?

No.

Andre'

-- 
Those who desire to give up Freedom in order to gain Security,
will not have, nor do they deserve, either one. (T. Jefferson)

Reply via email to