First page Back Continue Last page Overview Graphics

Example 2-2: The wc command

[aghods@ghods example1]$ wc -l collect.out

2079 collect.out

The command shows that the collect.out file has 2079 lines. The -l after command wc is called a switch. Majority of Linux commands accepts switches which somehow modify their behavior. The -l switch makes wc to prints only number of lines and ignore printing other info like number of words in the document.