ODOC: wc

Sunday, December 11, 2005

wc - Count & Print the No. of Bytes,Words & Lines in files.

Summary :

Print byte, word, and newline counts for each FILE, and a total line if more than one FILE is specified. With no FILE, or when FILE is -, read stdin.

Examples :
$ wc -- Accept the input from stdio and count

$ wc myfile -- Print the no .of bytes, words, lines in the file.

$ wc -l myfile -- Print the newline counts only

$ wc -w myfile -- Print the words count only

$ wc -c myfile -- Print the bytes count only

$ wc -L myfile -- Print the length of the longest line

$ wc f1 f2 f3 -- Print the no .of bytes, words, lines in each file and also print the total.

$ ls -1 | wc -l -- Print the total no .of files present in the dir
Read : man wc

Tech Tags:

comments links to this post Listen to this article Listen to this article

0 Comments:

Post a Comment

Links to this post:

Create a Link

<< Home

Previous Posts


referer referrer referers referrers http_referer

  • Subscribe to Free Software Blog
  • Google
Reader
  • Subscribe in Yahoo
  • Subscribe
in Bloglines
  • Link to Podcast

(RSS feed) for this blog
    Computers Blog Top Sites
  • Computers Blogs by Indian Bloggers
  • BLogstreet Profile

Sponsors