Skip to content

Commit 11a92a4

Browse files
committed
transformation example
1 parent c88d5ef commit 11a92a4

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

space_transformation.awk

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Get total weight in mega bytes.
2+
# Example: awk -f space_transformation.awk files/space.dat
3+
#
4+
{
5+
total+= $1 / ($2=="kb" ? 1024: 1)
6+
}
7+
END{
8+
print total
9+
}

0 commit comments

Comments
 (0)