Input file:
2
10
15
20
24
Output file
2 8 NNNNNNNN
10 5 NNNNN
15 5 NNNNN
20 4 NNNN
24
Do anybody experience subtraction column by column and print out number of subtraction times with N?
The second column of the output file is the subtraction of 10-2 = 8; The third column just the repeat 8 times of N etc.
awk, perl or multiple coloumn pipe together is fine as well.
I just not too sure how automatic do the subtraction and print out the number of subtraction times with N.
Really appreciate for any advice.
Thanks a lot.