I am writing a Korn Shell Script. In this script, I am performing multiple file manipulations, and generating various output files. I would like each output file to be named with the PID in the filename. For example, I'll run the script "myscript.ksh", and I want it to output three files, "outputfile1.7488.txt", "outputfile2.7488.txt", and "outputfile3.7488.txt", where "7488" is the PID. So in the script, I'll write the files out as outputfile1.${PID}.txt, outputfile2.${PID}.txt, and outputfile3.${PID}.txt. My question is how to get the variable "PID" to hold just the four digit PID. Any help, once again, would be greatly appreciated. Thanks to all.