useful shell script under mac