Bash - OR within an IF statement

view story

http://www.unix.com – Hey guys, Currently trying to write a wee script that runs only when logged in as one of two users. The rest of the script is working fine, but no matter what user I try to run it as, it always fails! This is the puzzling part: Code: if [[ $USER != "admin1"  ||  $USER != "admin2" ]]; then         echo "Run script as admin "         exit 1 else         ... runs some script . . . fi Does anyone have any ideas !? It's probably staring me straight in the face but as I'm still learning (HowTos)