Hi guys, I would like to know if there's a quick and dirty method (using bash/sed/awk) to perform the following:
Original file: ******************* t=0 1 t=1 1 t=2 -1 t=3 1 t=4 1 t=5 -1 ******************* Desired result: ******************* t=0 1 t=1 2 t=2 1 t=3 2 t=4 3 t=5 2 ******************* that is, I would like to perform cumulative addition on the second column. Thanks. Best regards, Yanto _______________________________________________ Slugnet mailing list [email protected] http://wiki.lugs.org.sg/LugsMailingListFaq http://www.lugs.org.sg/mailman/listinfo/slugnet
