changed [[ -> [ because the former did not work in sh