We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c88d5ef commit 11a92a4Copy full SHA for 11a92a4
space_transformation.awk
@@ -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