Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

hello i would like to know if its possible to turn this batch file into a working basfile for ubuntu, im completely new to all this. It works on a windows machine but it does not work on ubuntu. I found a converter on the internet but that dont work at all, so all help would be great

dim shell
dim port
port = 4000
set shell=createobject("wscript.shell")
For count = 0 to 5
shell.run "cssserver.bat " & port
port = port + 100
set shell=nothing
share|improve this question

closed as not a real question by Flimm, gertvdijk, Web-E, Jorge Castro, Ringtail Jan 19 '13 at 0:05

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. If this question can be reworded to fit the rules in the help center, please edit the question.

I would advice to include some comments about what this does (since not all of us are familiar with Windows/batch files but probably do know how to get it working under Linux ;) –  Rinzwind Jan 18 '13 at 20:48
We can't convert this VBA (I think) script for you, as it's not complete. It's missing a referenced file. I'm voting to close this question. I recommend you ask another question, asking how to achieve what you want to achieve, rather than how to convert a script. –  Flimm Jan 18 '13 at 20:55
That's a Basic script. You might be interested in getting Gambas or RealStudio if you want to continue basic programming, but otherwise the fact that you can't run VisualBasic scripts on Linux out of the box isn't really a question with an answer. –  Ken Jan 18 '13 at 20:59
Welcome to Ask Ubuntu! Sorry, but "convert this piece of code for me please" without any further details about what you're trying to accomplish with it is not a very constructive question for this Q&A site. Please refer to the FAQ about what kind of questions are appropriate on this site. –  gertvdijk Jan 18 '13 at 21:00

1 Answer 1

Since I'm more familiar with Python:

#!/usr/bin/env python

import os

for port in range(4000, 4500, 100):
    os.system("cssserver.bat %s" % port)

As @Flimm has mentioned, this would also require you to convert cssserver.bat, which may be a completely different story

share|improve this answer

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