thanks again John S... it's amazing how many ways there are to skin a cat...as may be obvious, I'm not really a shell script bloke (yet) and I really appreciate all the exposition on the subject of bash.
After some more tests I'll report my results for anyone interested. Using tapes and shell scripts is not as simple as I first thought. best regards Peter Peter Bishop HP Enterprise Services APJ Mainframe Capability & Engineering +61 2 9012 5147 office | +61 2 9012 6620 fax | [email protected] 36-46 George St | Burwood | NSW 2134 Australia -----Original Message----- From: Linux on 390 Port [mailto:[email protected]] On Behalf Of John Summerfield Sent: Tuesday, 15 December 2009 7:13 PM To: [email protected] Subject: Re: concatenating input files with named pipes Bishop, Peter wrote: > Hi again, > > I'm moving ahead a little bit and have done some basic tests with tapes but > now have something I don't understand. > > I'm trying to "concatenate" two tapes into one named pipe, and then read the > pipe, hoping thereby to read the two tapes at once (trying to emulate the > z/OS JCL concatenation concept). > > Here's my logic, which is not working as I'll explain in a minute. My > thinking is that I can write to the pipe sequentially and read it > sequentially, but it appears not to work that way. > > pe...@sydvs002:~> sudo dd if=/dev/rtibm0 of=pipe & > pe...@sydvs002:~> sudo dd if=/dev/rtibm1 of=pipe & > pe...@sydvs002:~> sudo dd if=pipe of=packages & Yuck! sudo bash -c\ '(sudo dd if=/dev/rtibm0;dd if=/dev/rtibm1 ) | dd of=packages' You can punctuate it differently: sudo bash -c\ '(sudo dd if=/dev/rtibm0;dd if=/dev/rtibm1 )' | dd of=packages and extend it sudo bash -c\ '(sudo dd if=/dev/rtibm0;dd if=/dev/rtibm1 )' \ | ssh other.example.com dd of=packages and cat will work as well as dd. -- Cheers John -- spambait [email protected] [email protected] -- Advice http://webfoot.com/advice/email.top.php http://www.catb.org/~esr/faqs/smart-questions.html http://support.microsoft.com/kb/555375 You cannot reply off-list:-) ---------------------------------------------------------------------- For LINUX-390 subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390 ---------------------------------------------------------------------- For LINUX-390 subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390
