I'm trying to write a bash script to manage setting up a user profile. I can't seem to figure out why this if statement won't work. I have the code:
#!/bin/bash #check if programs are installed ( TMUX=$(tmux -V) && echo "tmux at version $TMUX" ) || echo "tmux not installed" if [ $TMUX != "1.8" ]; then echo "installing tmux" fi
but not matter what I try, I constantly get the error
test.sh: line 6: syntax error near unexpected token `fi' test.sh: line 6: `fi'
Any ideas as to what could cause this?