I am on UBUNTU 12.04.
I have a shell script that logs the output of a certain processes. The process being logged changes depending on the parent shell script that called the logging script. I would like to write the output of this logging to a file on disk, but am having trouble naming the file.
I would love to name it according to the parent script's own name. Unfortunately I have absolutely no idea how to get that name from script. I imagine that the best way to do that would be to extract the parent PID ($PPID), and then use that to find the script name, but I also don't know how to do that.