I get a "Illegal variable name" error for the following piece of line in one of my shell scripts -
"$WORKING_DIR"/sendEmail.py "$TEST_STRING, Tests passed" "$(cat "$WORKING_DIR"/logs/"$THE_PACKAGE"/testResults.out)" >& "$WORKING_DIR"/logs/mailOut.txt
I believe the error is coming from the following line:
"$(cat "$WORKING_DIR"/logs/"$THE_PACKAGE"/testResults.out)"
I have looked extensively on the internet, but have not yet been able to resolve the issue.