Professional Documents
Culture Documents
Script Ne Bash Shell LINUX
Script Ne Bash Shell LINUX
DETYRE KURSI
Punoi: Durim Hysa
Besart Darsi
Klevis Cekani
Kushti eshte qe te jene numra te plote dhe numri i dyte te jete me i madh se 0.
#!/bin/bash
if [ $# -eq 0 ];then
first=$1
first=$1
second=$2
else
exit 0
# exit 0 do te thote qe kodi qe kthen funksionin ne 0 ku 0 eshte
parameter
fi
first=0
else
fi
else
exit 1
fi
# Përcakton nëse parametri i dytë është një numër i plotë dhe nëse
numër i plotë është jo-zero
[ $second -eq 0 ] && { echo "Numri i dyte nuk mund te jete 0";exit
102; }
else
exit 1
fi
Rezultati