January 2004
Intermediate to advanced
432 pages
7h 49m
English
A text file is a file containing human-readable text. Each line ends with a line feed character, a carriage return, or both, depending on the operating system. By Linux convention, each line ends with a line feed, the \n (newline) character in printf.
The examples in this chapter use a text file that lists several pieces of furniture by name, price, quantity, and supplier number, as shown in Listing 11.1.
Example 11.1. orders.txt
Birchwood China Hutch,475.99,1,756 Bookcase Oak Veneer,205.99,1,756 Small Bookcase Oak Veneer,205.99,1,756 Reclining Chair,1599.99,1,757 Bunk Bed,705.99,1,757 Queen Bed,925.99,1,757 Two-drawer Nightstand,125.99,1,756 Cedar Toy Chest,65.99,1,757 Six-drawer Dresser,525.99,1,757 Pine Round Table,375.99,1,757 ...
Read now
Unlock full access