To obtain a listing of your processes and their nice values, enter ps -l. The eighth column of output, headed ``NI'', shows the nice value. The following command line strips out just the command name and the nice value for each of the active processes:
$ ps -l | awk '{ printf("%s\t%s\n",$NF,$8)}'(For more information on the awk(C) programming language, see ``Using awk''). Note that when you run a process in the background under the Korn shell and the bgnice variable is set, the process runs with a nice value of 4. (You can examine the Korn shell's internal variables by entering the command set -o; you can switch bgnice off by typing set +o bgnice or switch it on by typing set -o bgnice.)