Thread: if statment into a while read loop
how add if statement while read statement?
file contains
code:1 2 3 4 5 6 7 8 9 10spiritechcode:while read n; if [[ $n -le 5 ]] echo "$n" else echo "n greater 5" fi done < file
where problem? code works fine.
Forum The Ubuntu Forum Community Ubuntu Specialised Support Development & Programming Programming Talk if statment into a while read loop
Ubuntu
Comments
Post a Comment