AWS SSM Linux Shell Script Closing Paren Expected Error

I ran my scripts through AWS SSM and received the "closing paren expected" error message. Quick check on my code, I was missing items in two different situations:

1. I was missing closing parentheses \), so adding it solves the issue. My code was like:

if [ \( <expr> ]; then <do this>; fi

2. My closing parentheses was not prefixed by space, so adding a space fixed it. It was like:

if [ \( <expr>\) ]; then <do this>; fi

Comments

Popular posts from this blog

AWS EC2 Can't Reach EC2 Metadata Service After Subnet Change

A2 Hosting with .NET Core 2.1

Xcode CodeSign Incorrectly States Password is Incorrect