You're replying to a comment by peteches.

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 )
/dev/fd/63

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 word "coding_325": (just to make sure you're a human)

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