#!/bin/sh

sh uses different syntax for operators than bash.

Use -o for or in place of || and -a for and in place of &&.

Shell Symbols
Conditional Statements
String Operators
Numeric Operators
File Operators
Built-in commands
Redirect stderr
echo test 2> /dev/null
Redirect stderr to stdout
echo test 2>&1

String Comparison

When checking for string length, include the string in quotes.

Both of these will return true:

[ -n string ]
[ -n ]

This will return false:

[ -n "" ]