script converting binary input to ksh print statement reproducing input