Different behaviour of the find (parameter not correct) on *nix and windows (ming32) systems

1

This command called from the Makefile works ok on the various *nix systems, but fails with Windows + Mingw32 bash/makefile:

for a in `find libr | grep -e dll$$`; do cp $$a ${WINDIST} ; done

This is the error it shows in mingw32 console:

for a in `find libr | grep -e dll$`; do cp $a w32dist ; done
FIND: Parameter format not correct

What the difference between most of the *nix bash and make and the mingw32's ones?

Anton Kochkov

Posted 2015-10-21T09:24:50.973

Reputation: 135

Answers

1

FIND: Parameter format not correct

The above error is from C:\Windows\System32\find.exe if you call it incorrectly:

F:\test>where find
C:\Windows\System32\find.exe

F:\test>find blah blah
FIND: Parameter format not correct

F:\test>
  • You have the Windows find (C:\Windows\System32\find.exe) in your PATH before the mingw32 find.

  • If you run which find in the mingw32 console it will show this.

  • You need to fix your mingw32 PATH so that the mingw32 utilities are found first.

DavidPostill

Posted 2015-10-21T09:24:50.973

Reputation: 118 938