#!/bin/bash
FN=$(wc -l < test.txt)
echo $FN
for i in {1..100..2}
do
awk '{ if(NR>='$i' && NR <= '$i+1'){print $0}}' test.txt
echo "print done"
if [ $i -gt $FN ]
then
break
fi
done
#!/bin/bash
FN=$(wc -l < test.txt)
echo $FN
for i in {1..100..2}
do
awk '{ if(NR>='$i' && NR <= '$i+1'){print $0}}' test.txt
echo "print done"
if [ $i -gt $FN ]
then
break
fi
done