I'm new to bash scripting, and I just want to do a simple little thing, but everything I read online seems to not work for me!
So I have this script here:
#!/bin/bash if [[ $1 = "32"]] then mv config.h config64.h mv config32.h config.h mv Makefile Makefile64 mv Makefile32 Makefile echo "READY FOR 32 BITS!" elif [[ $2 = "64" ]] then mv config.h config32.h mv config64.h config.h mv Makefile Makefile32 mv Makefile64 Makefile echo "READY FOR 64 BITS!" fi
and I get the error:
./switch-bits.sh: line 3: syntax error in conditional expression ./switch-bits.sh: line 4: syntax error near `then' ./switch-bits.sh: line 4: `then'
So my hands are thrown in the air here… what is wrong?