Open top menu
Πέμπτη 6 Μαρτίου 2014

Το παρακάτω script κάνει χρήση της εντολής case αντί για πολλαπλές if

#!/bin/bash
echo What do you want:
read var
case $var in
house) echo The price must be very high;;
car) echo The price must be high;;
bike) echo The price must be low;;
*) echo I do not know the price;;
esac
Different Themes
Written by Lovely

Aenean quis feugiat elit. Quisque ultricies sollicitudin ante ut venenatis. Nulla dapibus placerat faucibus. Aenean quis leo non neque ultrices scelerisque. Nullam nec vulputate velit. Etiam fermentum turpis at magna tristique interdum.

0 σχόλια