#!/bin/bash
l=`cat testing|wc -l`
for i in `seq 1 $l| sort -n -r`
do
sed -n "$i p" testing >> back
sed -i "$i d" testing
echo "deleted the line $i"
done
l=`cat testing|wc -l`
for i in `seq 1 $l| sort -n -r`
do
sed -n "$i p" testing >> back
sed -i "$i d" testing
echo "deleted the line $i"
done









