In a bash-script I need to check if the string $HEADER
starts with the character sequence "/*". I was trying:
if [ $(echo $HEADER | cut -c 1-2) = '/*' ]
It's not working as expected. It seems that the string is compared to the file list of the root directory.
How can I protect the characters / and * to be interpreted from the shell?
To protect the characters with a backslash isn't working either.