08-06-2012, 09:14 AM
|
#2
|
LQ Guru
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
|
You can use the wc command to get number of lines, number of words and number of characters. (Type "man wc" for more details.)
You can use the grep command to get lines with specific information and also print the line number for the lines it finds. (Type "man grep" for more details.)
You can use awk to do a lot of this as well. Use of awk can become fairly sophisticated. Searching for specific usage cases in web searchers for what you want to do would be good even after you've gone through an awk tutorial. For most Linux subjects if you type the subject and tutorial in a web search you'll find many hits. (e.g. "awk tutorial"). Of course awk also has a man page (man awk).
Linux also has info pages that sometimes give more detail than the man pages.
|
|
|