Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!wuarchive!cs.utexas.edu!romp!auschs!awdprime!doorstop.austin.ibm.com!tif From: tif@doorstop.austin.ibm.com (Paul Chamberlain) Newsgroups: comp.unix.questions Subject: Re: C-shell programming Keywords: csh, multiple file input Message-ID: <3039@awdprime.UUCP> Date: 3 Aug 90 18:41:13 GMT References: <230@jabberwock.shs.ohio-state.edu> Sender: news@awdprime.UUCP Reply-To: tif@doorstop.austin.ibm.com (Paul Chamberlain) Distribution: usa Organization: IBM AWD, Austin, TX Lines: 22 In article <230@jabberwock.shs.ohio-state.edu> reiner@jabberwock.shs.ohio-state.edu (Reiner Wilhelms) writes: >I'd like to create a c shell program which reads from 3 files and >generates 1 (or more ) output file(s). >Calling this csh script will look like this: > % my_shell_script input1 input2 input3 output A bourne shell script could use the 3< 4< etc. syntax like this : ( read from_filename1 <&3 read from_filename2 <&4 read from_filename3 <&5 echo to_filename_4 >&6 ) 3< $1 4< $2 5< $3 6> $4 I haven't tried this but it's at least close. I don't think csh has an equivalent feature. I think you can use "{" and "}" instead of "(" and ")" to be more efficient (one less process). Paul Chamberlain | I do NOT represent IBM tif@doorstop, sc30661@ausvm6 512/838-7008 | ...!cs.utexas.edu!ibmaus!auschs!doorstop.austin.ibm.com!tif