5
rated 0 times
[
5]
[
0]
/ answers: 1 / hits: 624
/ 2 Years ago, mon, december 6, 2021, 12:18:20
the script:
waktu=$(date +"%H")
kelompok="E20"
dir_skrg=$(pwd)
if (( $waktu >= 5 && $waktu <= 10 ))
then
salam="pagi"
elif (( $waktu >= 10 && $waktu <= 3 ))
then
salam="siang"
elif (( $waktu >= 4 && $waktu <= 7 ))
then
salam="sore"
else
salam="malam"
fi
echo “Selamat $salam $kelompok dengan user $USER, sekarang pukul $waktu dan pada direktori $dir_skrg”
it gives error:
script1.sh: 5: script1.sh: 14: not found
script1.sh: 8: script1.sh: 14: not found
script1.sh: 11: script1.sh: 14: not found
but not in my friend ubuntu's. andybody knows why?
14 is the hour when I run the script, I assume for some reason it thinks 14 is a file
More From » bash