Exercises
Exercise 1:
The solution can be found on the other tab.for i in {1..100}; do
if (( ((i % 2)) ==1)) ; then
echo $i
fi
doneExercise 2:
input
4
1
2
9
8
output
5.000The solution can be found on the other tab.sum=0
read num_or_args
for (( i=0; i<num_or_args; i=i+1)); do
read num
((sum+=num))
done
echo "print($sum/$num_of_args)" | python3Exercise 3a: Bash and GREP
Exercise 3b: Extended GREP - Part II
Last updated