perl -anE '($s,$F[1])=($F[1],$F[1]-$s);say "@F"' <your-file> [download]
In reply to Re: subtracting two lines in file by JavaFan in thread subtracting two lines in file by frank19