Instructions for creating the script file:
On Unix prompt:
1. script <your script file name> (This will start writing, what ever you will do after this command, in the specified file you have given)
2. cat <your c++ program file> (This will dump you c++ code in the script file)
3. Compile your code (using g++ <your c++ program file name> -o <your output file name>)
4. Execute your file (./<your output file name> )
5. Run your program 4-5 times. (So that I have enough out put to verify)
6. exit (To stop scripting the file)
7. enscript -2rG <your script file name> (This will print your script file)
Additional instructions:
1. Please do not use tab key or backspace key while you are scripting. (Because that will corrupt the script file and hence your print out)
· Alternate solution: Use this C program that cleans these characters out of script files. Thanks to Sean Boyden.
· I haven’t tried this but you can give a shot.