0

When I want to know that process has been spawned by bash, I just check ps. But I was wondering, sometimes I launch things as

for x in $(somecomplextask.sh); do foo $x; done

I wonder, is it possible to check somewhere for the complete line with the for loop. I have the file descriptor in /proc/.../fd/0, but I do not know if I can use some tool to examine it, or perhaps even the content is not anymore, as bash has already read the line. And it is not written in bash_history yet.

Still, I thought it was interesting to ask.

arivero
  • 200
  • 1
  • 1
  • 6
  • I think `set -x` is what you are looking for – 4snok Apr 30 '22 at 00:25
  • no, set -x is useful, but I was thinking in the case when the job is running and I want to know the full command it is executing at this point. – arivero May 01 '22 at 18:08

0 Answers0