Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 8. File Contents  > Counting Lines (or Paragraphs or Records) in a File...

8.2. Counting Lines (or Paragraphs or Records) in a File

8.2.1. Problem

You need to compute the number of lines in a file.

8.2.2. Solution

Many systems have a wc program to count lines in a file:


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint