Here is my shellscript if condition
if [[ $RBFilePath =~ \.js$ || $RBFilePath =~ \.json$ && ${#key_array[0]} = "JAVASCRIPT" ]]; then
Blah blah
blah blah
fi
What I want here is, if $RBFilePath ends with .js or .json AND First elemeny of array: key_array is equal to "JAVASCRIPT" then execute the if block.
But it is not executing. Can someone please help telling me issue.?