xxd - make a hexdump or do the reverse.
xxd test.sh
0000000: 2321 2f62 696e 2f6b 7368 0a66 6f72 2069 #!/bin/ksh.for i
0000010: 2069 6e20 6073 6571 2031 2033 600a 646f in `seq 1 3`.do
0000020: 0a20 2020 2020 2020 2065 6368 6f20 2274 . echo "t
0000030: 3d24 693b 220a 646f 6e65 0a0a =$i;".done..
xxd -i test.sh
unsigned char test_sh[] = {
0x23, 0x21, 0x2f, 0x62, 0x69, 0x6e, 0x2f, 0x6b, 0x73, 0x68, 0x0a, 0x66,
0x6f, 0x72, 0x20, 0x69, 0x20, 0x69, 0x6e, 0x20, 0x60, 0x73, 0x65, 0x71,
0x20, 0x31, 0x20, 0x33, 0x60, 0x0a, 0x64, 0x6f, 0x0a, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x63, 0x68, 0x6f, 0x20, 0x22, 0x74,
0x3d, 0x24, 0x69, 0x3b, 0x22, 0x0a, 0x64, 0x6f, 0x6e, 0x65, 0x0a, 0x0a
};
unsigned int test_sh_len = 60;