This is my bash script:
#!/bin/bash
if [[ '$1' == 'movie' ]]
then
echo 'true'
else
echo 'false'
fi
But if I run it like this:
./bash.sh movie
It keep saying false.
Same if I write the code like this:
#!/bin/bash
if [ '$1' = 'movie' ]
then
echo 'true'
else
echo 'false'
fi
But if I do this:
#!/bin/bash
if [ '$1' != 'movie' ]
then
echo 'true'
else
echo 'false'
fi
It says True!!!!
Help me.