updated for freebsd sh