With a modern grep version it is even more simple: grep -c 'the' /path/to/file.txt
I'm to lazy to look up when this feature was introduced. It works at least with grep version 2.9. -- Best regards, Jörg-Volker. -- 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/jbsg27$kcr$1...@dough.gmane.org