perl -ne "print pack("B*", $_)" input_file > output_file