在Linux下用Shell程序编写实现如下功能

2024-10-31 20:43:13
推荐回答(1个)
回答1:

s='y'
until [ "$s" == 'n' ]
do
  echo 'Print times:'
  read n
  for ((i=1;i<=$n;i++))
  do
      echo "Hello World!"
  done
  echo 'Do you continue?(y/n)'
  read s
done

 把上面的Echo 'Hello World!',改成你上面的内容,即:

echo "I love EOS."

echo "EOS stands for ***."

echo "After hard-working, now I’m better than before!"