|
发表于 2003-6-3 17:41:40
|
显示全部楼层
Try this one!
write them in a file named awk.test
#!/usr/bin/awk -f
BEGIN{PRE=0}
{print $1,$2-PRE; PRE=$2}
Assuming the data file name is data,"awk.test data" will get what you want.
Comments:modify the first line "/usr/bin/awk" to "/bin/awk",if neccesary.It's according to where awk is in your system. |
|