I have a pattern file, say t.txt, containing the following:
vali and the file I want to run grep against, say a, containing the following:
validate validate: bw_validate: [echo] Validating project: CrossService_v1_59_5_1 [echo] Found 62 errors and 28 warnings [echo] ----------------------------------------------------------------- [echo] Validating project: CRM-UDB_59_4_2 [echo] Found 25 errors and 28 warnings [echo] ----------------------------------------------------------------- [echo] Validation Failed: At least one project contains errors. notify: BUILD FAILED bw.xml:311: Validation Failed: At least one project contains errors. if I execute:
grep -iE vali a I get the expected output, i.e.:
validate validate: bw_validate: [echo] Validating project: CrossService_v1_59_5_1 [echo] Validating project: CRM-UDB_59_4_2 [echo] Validation Failed: At least one project contains errors. bw.xml:311: Validation Failed: At least one project contains errors. but if I execute:
grep -iE -f t.txt a I don't get any match. files are readable and both in the same directory (from which I execute the command). I tried both with -f and --file=t.txt, --file='t.txt', --file="t.txt"
I'm on linux Fedora 16 64bit. Strangely enough, the same command works properly in windows with the grep/egrep porting.
Am I missing something? Any help is appreciated as this is giving me an headache :( thanks!
cat -vet t.txt. Looks like your pattern file may contains somespacesorspecial charactersin them.dos2unixavailable. Good luck!!