💻 Software
How do you determine the actual command that is piping into you?
Fresh6 days ago
Mar 15, 20262377 viewsConfidence Score0%
0%
Problem
Let's say I have a bash script called . In this script, I want to read in input from a pipe, but I also want to know the command used to pipe input into me. Example: In the shell script, I want to know the command .
Error Output
tail -f /var/log/httpd/error | log.sh
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Canonical Fix
Unverified Fix
New Fix – Awaiting Verification
Fix for: How do you determine the actual command that is piping into you?
Low Risk
the pipe will appear as an entry in the list of open filedescriptors of your process: you could also use something like: so, than you have the inode of the pipe :) you can now search every other process under for that pipe. then you will have the co…
Awaiting Verification
Be the first to verify this fix
Sign in to verify this fix