26.06.2015 Views

Unix/Linux

Unix/Linux

Unix/Linux

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

if/then/elif/else/fidd<br />

d CddddddShelldd ifdthendelifdelsedfidddddd<br />

dddddddddddddddddddddddShellddddd<br />

✞<br />

#! /bin/sh<br />

echo ”Is it morning? Please answer yes or no.”<br />

read YES OR NO<br />

if [ ”$YES OR NO” = ”yes” ]; then<br />

echo ”Good morning!”<br />

elif [ ”$YES OR NO” = ”no” ]; then<br />

else<br />

fi<br />

exit 0<br />

✡✝<br />

echo ”Good afternoon!”<br />

echo ”Sorry, $YES OR NO not recognized. Enter yes or no.”<br />

exit 1<br />

✆<br />

ddd (ddddddd) <strong>Unix</strong>/<strong>Linux</strong>dddddddd 2009d12d 127 / 173

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!