You're viewing a comment by peteches and its responses.

peteches Permalink
June 21, 2012, 11:46

Hi Vishal

When you use the <( cmd ) construct bash replaces the <( cmd ) with the path to the fd of cmd's stdout. eg

[0]pete.uttley@jackfrog::1901$ echo <(cat /tmp/frog-uuid-patch )

as diff takes file paths as arguments it can handle this with no problem. It doesn't take them as stdin.

Read expects stdin to assign to it's variable so you need to redirect the contents of the file descriptor, hence the need to redirect the contents of the file handle.

Reply To This Comment

(why do I need your e-mail?)

(Your twitter name, if you have one. (I'm @pkrumins, btw.))

Type the first letter of your name: (just to make sure you're a human)

Please preview the comment before submitting to make sure it's OK.