LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   awk - syntax error (https://www.linuxquestions.org/questions/programming-9/awk-syntax-error-927809/)

linuxslayer69 12-06-2014 11:05 AM

sorry i havent got back to you guys in a while but, thank you very much for the replies they were very helpful and i actutaly got the dictionary file one to work, and i totally thank you guys and all of your help thanks again and have a good one

danielbmartin 12-10-2014 09:06 AM

I botched the test and mistakenly thought my grep solution was good. It isn't. Solution withdrawn. Lesson learned.

Daniel B. Martin

ntubski 12-10-2014 12:06 PM

Quote:

Originally Posted by danielbmartin (Post 5282488)
... this grep ...
Code:

grep ".{4,7}" <$InFile >OutFile
... produced this OutFile ...
Code:

Honda
Ford
Buick
Volvo
Mazda
Fiat


?

Code:

$ grep ".{4,7}" input
$ grep -E ".{4,7}" input # or grep ".\{4,7\}"
Honda
Ford
Chevrolet
Cadillac
Buick
Chrysler
Lincoln
Volvo
Renault
Mazda
Fiat
$ grep -Ex ".{4,7}" input
Honda
Ford
Buick
Lincoln
Volvo
Renault
Mazda
Fiat
$ grep -Ex ".{4,5}" input
Honda
Ford
Buick
Volvo
Mazda
Fiat



All times are GMT -5. The time now is 01:26 AM.