Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

wc(1) [linux man page]

WC(1)								   User Commands							     WC(1)

NAME
wc - print newline, word, and byte counts for each file SYNOPSIS
wc [OPTION]... [FILE]... wc [OPTION]... --files0-from=F DESCRIPTION
Print newline, word, and byte counts for each FILE, and a total line if more than one FILE is specified. With no FILE, or when FILE is -, read standard input. A word is a non-zero-length sequence of characters delimited by white space. -c, --bytes print the byte counts -m, --chars print the character counts -l, --lines print the newline counts --files0-from=F read input from the files specified by NUL-terminated names in file F; If F is - then read names from standard input -L, --max-line-length print the length of the longest line -w, --words print the word counts --help display this help and exit --version output version information and exit AUTHOR
Written by Paul Rubin and David MacKenzie. REPORTING BUGS
Report wc bugs to bug-coreutils@gnu.org GNU coreutils home page: <http://www.gnu.org/software/coreutils/> General help using GNU software: <http://www.gnu.org/gethelp/> Report wc translation bugs to <http://translationproject.org/team/> COPYRIGHT
Copyright (C) 2010 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. SEE ALSO
The full documentation for wc is maintained as a Texinfo manual. If the info and wc programs are properly installed at your site, the com- mand info coreutils 'wc invocation' should give you access to the complete manual. GNU coreutils 8.5 February 2011 WC(1)

Check Out this Related Man Page

WC(1)								   User Commands							     WC(1)

NAME
wc - print newline, word, and byte counts for each file SYNOPSIS
wc [OPTION]... [FILE]... wc [OPTION]... --files0-from=F DESCRIPTION
Print newline, word, and byte counts for each FILE, and a total line if more than one FILE is specified. A word is a non-zero-length sequence of characters delimited by white space. With no FILE, or when FILE is -, read standard input. The options below may be used to select which counts are printed, always in the following order: newline, word, character, byte, maximum line length. -c, --bytes print the byte counts -m, --chars print the character counts -l, --lines print the newline counts --files0-from=F read input from the files specified by NUL-terminated names in file F; If F is - then read names from standard input -L, --max-line-length print the maximum display width -w, --words print the word counts --help display this help and exit --version output version information and exit AUTHOR
Written by Paul Rubin and David MacKenzie. REPORTING BUGS
GNU coreutils online help: <http://www.gnu.org/software/coreutils/> Report wc translation bugs to <http://translationproject.org/team/> COPYRIGHT
Copyright (C) 2017 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. SEE ALSO
Full documentation at: <http://www.gnu.org/software/coreutils/wc> or available locally via: info '(coreutils) wc invocation' GNU coreutils 8.28 January 2018 WC(1)
Man Page

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Finding word in file then print the preceding....

Hi, I am looking for a way to find a particular word in a file then print a line that precedes this line, as well as this line. Sometimes in a log file there is only one word per line and I need to print one of the lines leading up to the single worded line. Example - I can grep for ouch... (5 Replies)
Discussion started by: g_jumpin
5 Replies

2. UNIX for Dummies Questions & Answers

How to find if a file is zero byte or not?

hi, How to check if a file or files are of zero bytes and if yes, then to print their names? Ashu (1 Reply)
Discussion started by: er_ashu
1 Replies

3. UNIX for Dummies Questions & Answers

How to print the word

1) I had one query regarding how to define a particular value which has a space. For example, I would say for i in s su sur do print $i sleep 1 done This will results in s su sur Now I want... (0 Replies)
Discussion started by: ss_psm
0 Replies

4. Forum Support Area for Unregistered Users & Account Problems

newline

I have an old file originally created in vi but read and saved by a word processor at some point. I have ^Ms and know how to substitute them for anything I wish but I still only have one long line when viewed in vi. So I suppose I need to substitute a newline for each ^M but I don't know the... (2 Replies)
Discussion started by: Gale Gorman
2 Replies

5. Shell Programming and Scripting

print next line if matches a particular word..need help

Hi i need a help for making a script whch can print next line if it matches a particular word like file1 have ename Mohan eid 2008 ename Shyam eid 345 if scipt got Mohan it will print next line (eid 2008) pls help me .......:) (2 Replies)
Discussion started by: anish19
2 Replies

6. Shell Programming and Scripting

Replace only if the keyword is the first word in every line

How do I replace only if the keyword is at the begining of a line? Code: -- a = “This is a print statement” print a -- What if I want to replace print by #print only in the second line i.e only if the line starts with that keyword. Please help me out. I'm new to SED. -----Post... (5 Replies)
Discussion started by: alexzubin
5 Replies

7. Shell Programming and Scripting

Counts a number of unique word contained in the file and print them in alphabetical order

What should be the Shell script that counts a number of unique word contained in a file and print them in alphabetical order line by line? (7 Replies)
Discussion started by: proactiveaditya
7 Replies

8. Homework & Coursework Questions

Help Me

Can u help me on this? 1.I have a file having 10 lines as content. Please tell me how to print the 5th and 9th line to the screen? 2.How to print last word in a line of file? (1 Reply)
Discussion started by: anand.reddy
1 Replies

9. UNIX for Dummies Questions & Answers

BASH - Counting word occurrences in a Web Page

Hi all, I have to do a script bash (for university) that counts all word occurrences in a specific web page. anyone can help me?. Thanks :) (1 Reply)
Discussion started by: piacentero
1 Replies