help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-bash] How to figure out the dev path of process substitutions?


From: Peng Yu
Subject: [Help-bash] How to figure out the dev path of process substitutions?
Date: Fri, 20 Sep 2019 17:33:21 -0500

$ grep x -H -n <(printf '%s' {1..3}) <(printf '%s' {a..c}) <(printf '%s' {x..z})
/dev/fd/61:1:xyz

I'd like to figure about of the dev path of process substitutions in
the command like the above. So that I can post process the result as
in a pipeline.

$ grep x -H -n <(printf '%s' {1..3}) <(printf '%s' {a..c}) <(printf
'%s' {x..z}) | post_proc #will replace replace dev path into something
more readable.

I could run the following command, which shows the 1,2,3 process
substitutions results in /dev/fd/6{3..1} respectively.

$ echo <(printf '%s' {1..3}) <(printf '%s' {a..c}) <(printf '%s' {x..z})
/dev/fd/63 /dev/fd/62 /dev/fd/61

But I am not sure if it is always the case I can use `echo` to figure
all the actually dev path of another command. Also, I want to avoid
calling `echo`.

Is there a better way to do this?

-- 
Regards,
Peng



reply via email to

[Prev in Thread] Current Thread [Next in Thread]