> pll@tater:~$ ls -l <( echo )
> lr-x------ 1 pll pll 64 Jul 31 10:02 /dev/fd/63 -> pipe:[5071]
> pll@tater:~$ echo <( ls -l )
> /dev/fd/63
>
>Definitely not what I expected at all. Especially considering
>
> pll@tater:~$ ls -l /dev/fd/
> total 0
> lrwx------ 1 pll pll 64 Jul 31 10:14 0 -> /dev/pts/1
> lrwx------ 1 pll pll 64 Jul 31 10:14 1 -> /dev/pts/1
> lrwx------ 1 pll pll 64 Jul 31 10:14 2 -> /dev/pts/1
> lr-x------ 1 pll pll 64 Jul 31 10:14 3 -> /proc/1461/fd
Heh. You're in a maze of twisty little passages...
I think you're (at least partly) being faked out by some
of the symlinks in question:
# ls -lad /dev/fd /proc/self
lrwxrwxrwx 1 root root 13 Apr 6 14:39 /dev/fd -> /proc/self/fd
lrwxrwxrwx 1 root root 64 Jul 31 08:09 /proc/self -> 4016
...but those are just decoys intended to prevent understanding.
Here's what the BASH man page says about 'Process Substitution':
> Process substitution is supported on systems that support
> named pipes (FIFOs) or the /dev/fd method of naming
> open files. It takes the form of <(list) or >(list).
> The process list is run with its input or output connected
> to a FIFO or some file in /dev/fd. The name of this file
> is passed as an argument to the current command as the
> result of the expansion. If the >(list) form is used,
> writing to the file will provide input for list. If the
> <(list) form is used, the file passed as an argument
> should be read to obtain the output of list.
*****************************************************************
To unsubscribe from this list, send mail to [EMAIL PROTECTED]
with the text 'unsubscribe gnhlug' in the message body.
*****************************************************************