0

Admittedly I have not used agrep on *nix before, so this may just be a newb mistake on my part, but rather than spin up a *nix box and play there, I thought I might ask the smart people here first.

I installed tre agrep via gnuwin32 on my Windows box - the binary seems to be working - I get some help output and error output, but I can't seem to get any meaningful matching output.

My test file: testing.txt

testing customer
random client name
super
super pty ltd
testing trust
testing

The only time I got any type of output was with this line:

agrep.exe "^" .\testing.txt

Output:

ÿþt

Other simple tests for "testing" gave me no output:

agrep.exe "testing" .\testing.txt

Can someone tell me what I am doing wrong, or more specifically how to do it right? :)

Thanks!

johnnygear
  • 93
  • 1
  • 6

1 Answers1

0

You have an BOM prefixed unicode text file that agrep is not able to handle. Change the file encoding to ansi or try

type .\testing.txt | agrep "^"
MC ND
  • 69,615
  • 8
  • 84
  • 126