#!/bin/sh echo BEFORE cat >/tmp/xyz.cpp <<'CPP' #include int main(){puts("hello");} CPP c++ /tmp/xyz.cpp -o /tmp/xyz /tmp/xyz echo AFTER