Dummy command in windows cmd

On Linux, we have a make file:

$(foreach A,ab,echo $(A) &&) true 

It works and echoes

 a b 

Now we want to transfer it to Windows. The shortest command for Windows that does nothing:

 if 0==1 0 

Thus, an example make file will look

 $(foreach A,ab,echo $(A) &&) if 0==1 0 

Is there any fictitious command in the window on Windows (which really does nothing)? Or some good hack?

+13
source share
3 answers

The rem command does nothing.

+19
source

The call command does nothing without any argument and has no side effect, because rem has.

Example:

 echo Wait for it... call echo Nothing happened! 
+17
source

Old thread, new answer.

I used cd. when I don’t want to do anything in windows (and I often do it), since "changing the directory by itself" has no side effects at all, as far as I can see.

+6
source

All Articles