I have the following simple Windows batch script:
@echo off
echo Parameter 1: "%~1"
echo Parameter 2: "%~2"
When I execute it from the Windows command line (cmd) I get the following desired output:
C:\windows-script.bat "a=1" b
Parameter 1: "a=1"
Parameter 2: "b"
I now would like to execute the same script from a Cygwin bash command line and get the same output. Unfortunately I was not able to achieve what I want. Here are three unsuccessful trials:
$ /cygdrive/c/windows-script.bat "a=1" b
Parameter 1: "a"
Parameter 2: "1"
$ /cygdrive/c/windows-script.bat 'a=1' b
Parameter 1: "a"
Parameter 2: "1"
$ /cygdrive/c/windows-script.bat '"a=1"' b
Parameter 1: "\"a"
Parameter 2: "1\"""
Any ideas how to execute the batch script from Cygwin bash in the desired way?
"a\=1"work? Or possibly"a^=1"?