cat > /tmp/a.c <<'ZZZ' int printf(char*,...)SEMI int putchar(int)SEMI int main()LBR printf("HELLO")SEMI putchar(10)SEMI return 0SEMI RBR ZZZ cat > /tmp/fix.py <<'PYZ' s=open('/tmp/a.c').read() for a,b in [('SEMI',chr(59)),('LBR',chr(123)),('RBR',chr(125))]: s=s.replace(a,b) open('/tmp/b.c','w').write(s) PYZ python3 /tmp/fix.py cat /tmp/b.c cc /tmp/b.c -o /tmp/b /tmp/b echo DONE