0

I have a shell script with sample code as follows..am trying to convert into a .cmd file.. can anyone provide inputs on what is the syntax for while and case in .cmd file?

while getopts "c" flag
do
   # In case clear option
   case $flag in
   c) code
      exit
   ;;
   esac
done
3
  • 1
    Why convert. Just install cygwin on windows, and run your script.
    – user590028
    Commented Jul 12, 2013 at 2:31
  • cannot install cygwin on server unfortunately..need to convert to windows.. Commented Jul 12, 2013 at 2:36
  • @Ashwini - do you have any inputs? Commented Jul 12, 2013 at 2:37

1 Answer 1

0

You should refer to Microsoft's documentation.

2
  • i dont find any whle loop syntax Commented Jul 12, 2013 at 2:53
  • Looks like you should use if and goto.
    – cahn
    Commented Jul 12, 2013 at 3:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.