Programming Tips - Bash: Change a script's command line as seen in `ps`

Date: 2023apr7 Update: 2025jul5 Language: bash Q. Bash: Change a script's command line as seen in `ps` A. To change what shows up in `ps`:
echo -n 'my new command line' >/proc/$$/comm
Running
$ ps
Outputs:
PID TTY TIME CMD 2482391 pts/0 00:00:16 my new command 2617215 pts/0 00:00:00 ps