【发布时间】:2020-01-26 21:16:37
【问题描述】:
echo "Enter the current time: "
read h m s
s = `expr $n + 1`
if [ $n -eq 60 ]; then
s = 0
m = `expr $m + 1`
if [ $m -eq 60 ]; then
m = 0
h = `expr $h + 1`
if [ $h -eq 24 ]; then
h = 0
fi
fi
fi
echo "The time after one second is $h $m $n"
【问题讨论】:
标签: linux bash shell ubuntu unix