chris yo
chris yo

Reputation: 1277

MSYS error "rem: command not found"

I am getting this error "rem:command not found" in my batch file. Other dos commands (e.g. echo) are also not found.

My makefile is calling this batch file. This works previously when I am using cygwin. But when I changed to MSYS, I am getting this error. Anyone know why this is?

I am using MSYS version 1.0.17 on a Windows pc. But, I did not install Mingw. Should i install it also?

Upvotes: 4

Views: 9602

Answers (2)

A. B. M. Nazibullah
A. B. M. Nazibullah

Reputation: 51

After trying with cmd //c [path_to_bat file] it works for me. This is because mingw cannot run *.bat file directly after running *.bat file with cmd it works.

I found following mail thread about this type of issue https://lists.gnu.org/archive/html/help-gnu-emacs/2003-10/msg00323.html

Upvotes: 0

Zombo
Zombo

Reputation: 1

It looks as though you are trying to run a "Batch" file using Bash. This will not work. While Batch file interprets rem as a comment, Bash simply thinks it is a command and tries to run it.

My suggest would be to rewrite it as a Bash script, perhaps this could be a starting point.

Upvotes: 2

Related Questions