Bionix1441
Bionix1441

Reputation: 2319

Call a shell function from command line in windows?

I have a windows shell script where I can call the methods from the command line.

In the shell script:

:build
Do something
goto:eof

:run
Do something
goto: eof

From the command line:

 script.sh build

I get an error:

 bash :build: command not found

How can I call the functions defined in the shell script from command line?

Upvotes: 0

Views: 457

Answers (1)

user1934428
user1934428

Reputation: 22225

Even if you would fix the error with :build, bash would next complain about goto. Your script is not a bash program. It looks more like a MSDOS batch file.

Upvotes: 1

Related Questions