diff options
author | obrien <obrien@FreeBSD.org> | 2001-11-02 21:06:08 +0000 |
---|---|---|
committer | obrien <obrien@FreeBSD.org> | 2001-11-02 21:06:08 +0000 |
commit | cfe0e2b488d886d14fc1755679b8a88165b22d92 (patch) | |
tree | fbf9ca4d3f276e13b39090465008b182d20f0e5a /contrib/awk/awklib/eg/prog/wc.awk | |
parent | 9682ea287751aa7aad9e21c50ba74cfb3d7314d0 (diff) | |
parent | 223f0286ad0612783e0da01de3b5bfdc52e3b25c (diff) | |
download | FreeBSD-src-cfe0e2b488d886d14fc1755679b8a88165b22d92.zip FreeBSD-src-cfe0e2b488d886d14fc1755679b8a88165b22d92.tar.gz |
This commit was generated by cvs2svn to compensate for changes in r85898,
which included commits to RCS files with non-trunk default branches.
Diffstat (limited to 'contrib/awk/awklib/eg/prog/wc.awk')
-rw-r--r-- | contrib/awk/awklib/eg/prog/wc.awk | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/contrib/awk/awklib/eg/prog/wc.awk b/contrib/awk/awklib/eg/prog/wc.awk index 56aab42..f46616b 100644 --- a/contrib/awk/awklib/eg/prog/wc.awk +++ b/contrib/awk/awklib/eg/prog/wc.awk @@ -1,4 +1,5 @@ # wc.awk --- count lines, words, characters +# # Arnold Robbins, arnold@gnu.org, Public Domain # May 1993 @@ -8,6 +9,8 @@ # -c only count characters # # Default is to count lines, words, characters +# +# Requires getopt and file transition library functions BEGIN { # let getopt print a message about @@ -29,11 +32,11 @@ BEGIN { print_total = (ARGC - i > 2) } -function beginfile(file) { +function beginfile(file) +{ chars = lines = words = 0 fname = FILENAME } - function endfile(file) { tchars += chars @@ -53,7 +56,6 @@ function endfile(file) lines++ words += NF } - END { if (print_total) { if (do_lines) |