I want to extract urls (matching a pattern) from a file & download them. Here’s my egrep expression (on Cygwin) :
egrep -o -e "http([^\"]*)filter=[0-9]+" myfile.html
This works fine until I try to use a redirect or pipe. Example :
egrep -o -e "http([^\"]*)filter=[0-9]+" myfile.html > tmp.html
OR
egrep -o -e "http([^\"]*)filter=[0-9]+" myfile.html | wget -i -
Error :
egrep: >: No such file or directory
I think the error is due to the backslash before the quote but I’ve tried escaping it. Doesn’t work.
I just tried it and it succeeded for me with
CYGWIN_NT-6.1-WOW64 1.7.17(0.262/5/3) 2012-10-19 14:39:I wonder if you’ve got a Bash alias gone haywire.