Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How do I use the set /a command on the Wine version of CMD?

This doesn't work for me on Ubuntu 12.04 LTS:

set /a option=1+1
echo %option%

On a Windows computer it would output 2 on the screen but in the Wine version it just outputs whether Echo is on or not.

How do I fix this?

share|improve this question
Can someone like please answer the question – Shubshub Jan 19 '13 at 3:40

"set /a" was not implemented in cmd until WINE 1.5.20

Depending on what you're trying to accomplish you may be able to work around this by doing the math with a bash script that outputs to a text file, then assigning the contents of the file to a variable from inside WINE like so:

set /p option=<file.txt
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.