William Seemann
William Seemann

Reputation: 3530

Shell scripting error: Syntax error: "(" unexpected

Can someone explain to me why the following shell script line throws this error:

Syntax error: "(" unexpected

Upvotes: 1

Views: 1002

Answers (1)

Jordan
Jordan

Reputation: 32522

Shell scripts expect variables to be set in the pattern of:

VARIABLE=value

You can't have any additional = signs in there. However, you can execute other scripts like this:

VARIABLE=$(basename $1)
VARIABLE=`basename $1`

Either one works.

In your case, I can't tell what you're doing, but it isn't right at all. My guess is that you need to do this:

env LD_LIBRARY_PATH=$(basename $1)

Upvotes: 1

Related Questions