Thursday, March 21, 2019

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

No comments:

Post a Comment