From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f678f,46d9c5892d08c466 X-Google-Attributes: gidf678f,public X-Google-Thread: 1012a6,46d9c5892d08c466 X-Google-Attributes: gid1012a6,public From: cek@tblv002.boeing.COM (Conrad E. Kimball) Subject: Re: ksh process substitution - which ksh's support this? Date: 1997/11/13 Message-ID: #1/1 X-Deja-AN: 289875021 Sender: nntp@news.boeing.com (Boeing NNTP News Access) X-Nntp-Posting-Host: tblv002.ca.boeing.com References: <01bced5e$dd619580$026464c0@simon.iaccess.com.au> Organization: Boeing Computer Services, Seattle, WA Newsgroups: comp.unix.osf.misc,comp.unix.shell The Bolsky & Korn book "The KornShell", page 326, under "Possible Extensions", describes process substitution as being available only on versions of UNIX that support the /dev/fd directory for naming open files. With words like this I would not rely on it being available for use in a portable script. -- Conrad In article <01bced5e$dd619580$026464c0@simon.iaccess.com.au>, "Simon Taylor" writes: |> I have written some ksh scripts that need to be portable across a number |> of Unixes. |> |> To my dismay, I have discovered that the process substitution feature |> I have in my SCO "Open Server 5" ksh (and in the GNU bash), is not |> available in the ksh shipped with most of the other Unixes I have |> access to. |> |> Is this just because these machines happen to be a few years old, |> and the newer ksh simply isn't on them, or is process substitution |> not supported universally? |> |> It is particularly important for me to discover whether this feature |> is supported in the latest Digital Unix, as it is not present in v4.0 |> of the OS. |> |> ie: With a shell that supports process substitution one can, for instance, |> place a process in the context where a file name is |> expected. As a trivial example: |> |> wc <(ls) |> |> will return the word count of the output of the ls command, as if |> the output were a file. |> |> Regards, |> |> -- |> Simon Taylor (simon@unisolveX.com.auX - remove the "X"s to reply) |> Unisolve Pty Ltd Melbourne, Australia -- Conrad Kimball | Client Server Tech Svcs, Boeing Information & Supt. cek@bcstec.ca.boeing.com | P.O. Box 24346, MS 7M-HC (425) 865-6410 | Seattle, WA 98124-0346