1

I have a shell script to convert WordPress Plugin readme files between .txt format and .md. It works perfectly fine in Mac terminal.

When I tried to run the shell script in Ubuntu, the following line

PLUGINMETA=("Contributors" "Donate link" "Donate Link" "Tags" "Requires at least" "Tested up to" "Stable tag" "License" "License URI")

throws the following syntax error.

Syntax error: "(" unexpected (expecting "}")

That particular line is just declaring a list of string variables. I am not sure why it is generating a syntax error. Can someone kindly tell me which there is an error?

Edit:

The full source code of the file is available at https://github.com/sudar/wp-plugin-in-github/blob/master/readme-convertor.sh

I have picked up the relevant line and added above. Not sure if I have to include more lines.

1

1 Answer 1

4

Damn!!, I seem to be using the wrong shell. I was executing it with sh, instead of bash.

In mac, sh is mapped to bash, but it is not in Ubuntu.

Sign up to request clarification or add additional context in comments.

Comments

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.