test if param is not empty bash

[ -n "$1" ] && echo $1 || echo param is empty
Advertisements