On Fri, 09 Dec 2011 12:34:45 +0100, Jörg-Volker Peetz wrote: > Yes, you are right. My suggestion doesn't work if a word appears more > than once in a line since only lines which contain the word are counted. > Sorry for the confusion.
PMFJI. Never mind; *I'm* glad you mentioned it anyway. I have a script which needs just the count of lines containing something, and hitherto grepped the file and then piped the result into wc -l. I have now changed it to use grep - c instead. Saves a process, and is more elegant. Thanks! -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/jbtenk$fk$1...@dough.gmane.org