the command "ps -p $$ -o comm=" improperly lists all processes and fields not just the specified field for the current process.
For example, the above command should produce output similar to the following (assuming bash is the shell executing the above ps command):
bash
However, on OpenVMS this shell command produces output similar to the following (when the shell process was 4490):
PID TTY TIME CMD
1275 _FTA2: 0:14 dbgperl
4482 ? 0:02 dtsession
4485 ? 0:08 dtwm
4489 ? 0:03 decw$terminal
4490 _FTA11: 0:06 bash
4491 _FTA12: 0:00 (dcl)
4492 _FTA13: 0:00 (dcl)
4493 ? 0:01 dtpad
4494 ? 0:01 dtpad
4495 ? 0:01 dtpad
4497 ? 0:02 dtpad
4498 ? 0:03 dtpad
4529 ? 0:02 dtpad
4537 ? 0:00 dtscreen
4540 ? 0:00 dtscreen
4542 ? 0:00 dtscreen
4544 ? 0:00 dtscreen
4545 ? 0:00 dtscreen
4547 ? 0:00 dtscreen
4548 ? 0:00 dtscreen
3526 ? 0:00 dtscreen
4573 ? 0:03 dtfile
4575 ? 0:02 dtcalc
4602 ? 0:00 dtscreen
4605 ? 0:00 dtscreen
4689 ? 0:00 ps
4690 ? 0:00 (dcl)
Diff: