% script myfilename % cat prog.c % a.out % whatever you need to input into the program % a.out (runs program again if needed) % exit % message concerning script session is printed and the file myfilename is now in your directory and you are out of the script session