Re: grep and the -f switch

2012-11-26 Thread Roy Jensen
The issue is the text format. Windows is \r\n; Unix is \n. I used Notepad++ to save in Unix text format and everything worked fine. Sigh...should have thought of that before. Roy Jensen -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- *** Imagination is more importan

Re: grep and the -f switch

2012-11-26 Thread Greg Chicares
On 2012-11-26 19:08Z, Roy Jensen wrote: > I've created a text file (in Windows) with the text patterns I wish to > search for. Using the -f switch, grep only searches for the last > pattern in the file. If there is a blank line at the end, grep finds > nothing. > > grep -a -A 4 -f pattern.txt my.f

grep and the -f switch

2012-11-26 Thread Roy Jensen
I've created a text file (in Windows) with the text patterns I wish to search for. Using the -f switch, grep only searches for the last pattern in the file. If there is a blank line at the end, grep finds nothing. grep -a -A 4 -f pattern.txt my.file > output.txt Any suggestions to get this to wor