Linux - Sample Interview Question (Senior Level)

What will be the output of the following script?

[ec2-user@end]$ cat ex2.sh
COUNT=22

a=19

while [ $a -le "$COUNT" ]
do
 a=$(($a+1))
 res=$(($a%7))
 if [ "$res" -eq 0 ]
 then
   break
 fi

 echo "$a "
done

[ec2-user@end]$ . ex2.sh

  1. 20
    21
    22
  2. 19
    20
    21
  3. 21
  4. 20
Tests in Linux for Seniors

Test Name Difficulty Time (minutes) No. of Questions
Linux Online Test for Seniors Linux Senior 20 10