I am writing a bash script which runs through the numbers 1 - 50 and I have to output every number except numbers which are multiples of 4 (ex. 4, 8, 12..). I have tried using an example from a similar question which asks to output the same array except certain numbers.
In the code attached my program will output every number except 3.
#!/bin/bash
LIMIT=49
echo "Printing multiples of 4 from 1 - 50: "
a=0
while [ $a -le $LIMIT ];do
a=$(($a+1))
if [$a -eq 3]
then
continue
fi
echo -n "$a"
done
How should I change the IF statement to output my desired script?
seq 49 | sed '4~4d'?