Thanks for all replies.
Now I have installed cygwin in unix mode and converted all my script files by
running
dos2unix *.sh. Everything works much better, thanks for all the help.
I got the grep -f problem when running it in dos mode. I actually tried
installing in unix mode but
got lots of ":
If you set up CygWin to use DOS mode line ending, the \n should be \r\n.
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
On CygWin:
$ echo -e "calvin\nhobbes">a
$ echo -e "calvin chased\nblah blah\nhobbes">b
$ grep -f a b
calvin chased
hobbes
#!sh
echo -e "calvin\nhobbes" > expressions.txt
echo -e "calvin chases\nhis favourite imaginary friend\nhobbes" > text.txt
grep -f expressions.txt text.txt
$ ./a.sh
calv
On 16 July 2007 15:12, Mårten Gustafsson wrote:
> Hi
>
> I have a problem with grep -f. Here is my example script:
>
> #!sh
> echo -e "calvin\nhobbes" > expressions.txt
> echo -e "calvin chases\nhis favourite imaginary friend\nhobbes" > text.txt
> grep -f expressions.txt text.txt
>
> The output
4 matches
Mail list logo