I'm relatively new to the terminal programming. I'm trying to run an IF
condition within a FOR
loop. (The command is to be run by a cronjob)
for i in {1..5}; do echo $i; if [ $i>3 ]; then echo $i; fi; done
I want it to output as
1
2
3
4
4
5
5
But the real output from that command is
1
1
2
2
3
3
4
4
5
5
Could anyone help me point out the mistake?
Thanks!