Friday, September 5, 2014

special count in a text file

here is the search need to be done in beginning of the file
grep -a "^D" NCFPAY.TXT

here is the seatch need to be done at end of line

grep -a "TEXT$" NCFPAY.TXT

count the empty line

grep -a "^$" NCFPAY.TXT

there is more from http://www.thegeekstuff.com/2011/01/regular-expressions-in-grep-command/