summaryrefslogtreecommitdiff
path: root/wc.awk
diff options
context:
space:
mode:
Diffstat (limited to 'wc.awk')
-rw-r--r--wc.awk8
1 files changed, 8 insertions, 0 deletions
diff --git a/wc.awk b/wc.awk
new file mode 100644
index 0000000..869590d
--- /dev/null
+++ b/wc.awk
@@ -0,0 +1,8 @@
+{
+ w += NF
+ c += length + 1
+}
+
+END {
+ print NR, w, c, FILENAME
+}