I'm trying to do the following simple command in Windows 10
via Power-Shell CLI. How can I do that?
ID=test001 ./initializeID.sh
Where initializeID.sh
is:
#!/bin/bash
echo "Initializing for ID: $ID"
DPPROG="{\"title\":\"Test \", \"Id\": \"$ID\"}"
curl -H "Content-type: application/json" -d "$DPPROG" http://localhost:8080/StorageApi/id
Currently if I run it, it shows this error:
ID=test001 : The term 'ID=test001' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ ID=test001 ./initializeID.sh
+ ~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (ID=test001:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException