practice02 bash code for AMPD