Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: unix question: KSH pipes

RE: unix question: KSH pipes

From: <ddorr.cs_at_clearstream.com>
Date: Fri, 9 Jun 2000 11:13:18 +0200
Message-Id: <10523.108362@fatcity.com>


I agree with Steve : as far as I understand Unix pipes, this should'nt work ... but - yes there is a but -
after some testing on my machine, it appears that it behaves "normally" ( that is, it does NOT work ) when you're sending less then 10 blocks to the pipe, and works otherwise.
My understanding of this, is that head reads 10 Unix blocks, feels good with it to perform its -n 4 count and releases the rest to tail. Surprising, so I will need to do some research on this.

So, I guess your third sar returns less data then the two others ( < 5120 bytes ).
Anyway, you shouldn't rely on this and find another way to do it.

HTH,
> ----------
> From: Steve Adams[SMTP:steve.adams_at_ixora.com.au]
> Reply To: ORACLE-L_at_fatcity.com
> Sent: Friday, June 09, 2000 10:04
> To: Multiple recipients of list ORACLE-L
> Subject: RE: unix question: KSH pipes
>
> Hi Chuck,
>
> The two that work shouldn't. I suggest you split the output to a temporary
>
> file using tee, and use that file as the input to the tail command.
>
> Regards,
> Steve Adams
> http://www.ixora.com.au/
> http://www.oreilly.com/catalog/orinternals/
> http://www.christianity.net.au/
>
>
> -----Original Message-----
> From: Chuck Hamilton [SMTP:chuck_hamilton_at_yahoo.com]
> Sent: Friday, June 09, 2000 3:03 AM
> To: Multiple recipients of list ORACLE-L
> Subject: unix question: KSH pipes
>
>
> I have three SGI servers running the exact same version of IRIX (6.5.5 64
> bit). I have a pipeline that works fine on two of them but not on the
> third. Here's the pipeline...
>
> sar -w | (head -n 4 ; tail)
>
> It prints the first 4 lines followed by the last 10 lines of the sar
> output
> on two machines. On the third it just prints the first 4 lines. Does
> anyone
> have any idea why? Is there an environment variable or set command I need
> to execute to make it work as it does on the other 2 machines?
>
>
>
>
>
> ---------------------------------
> Do You Yahoo!?
> Yahoo! Photos -- now, 100 FREE prints! << File: ATT00067.htm >>
> --
> Author: Steve Adams
> INET: steve.adams_at_ixora.com.au
>
> Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
> San Diego, California -- Public Internet access / Mailing Lists
> --------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from). You may
> also send the HELP command for other information (like subscribing).
Received on Fri Jun 09 2000 - 04:13:18 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US