From mboxrd@z Thu Jan 1 00:00:00 1970 From: Scott Taylor Subject: Re: counting shell args Date: Mon, 16 Dec 2002 14:18:36 -0800 Sender: linux-admin-owner@vger.kernel.org Message-ID: <5.1.1.6.0.20021216135627.01c67f78@mustang> References: <5.1.1.6.0.20021216132151.01c70450@mustang> Mime-Version: 1.0 Return-path: In-Reply-To: List-Id: Content-Type: text/plain; charset="us-ascii"; format="flowed" Content-Transfer-Encoding: 7bit To: linux-admin@vger.kernel.org At 01:49 PM 12/16/02, you wrote: >On Mon, 16 Dec 2002, Scott Taylor wrote: > > > That should be very useful to know. :) > > > > Now you have me curious (grr...I just got over that) why do you care if > > there are more than 25 blocks in your zipped file? > >If it dumps out a zero byte file, as part of the pipe gzip will go gzip >it, and it ends up being 20 bytes. As far as smbtar is concerned, >that's a valid output, and returns 0 error code. It was easier to put >down 25 than figure out if that's 25 bytes or 25 kilobytes. Ok. But you are testing for blocks not bytes or KB. Not that it probably matters at this point; blocks these days are usually 1K size anyhow. >If it's a zero return code, AND the file is over 25(k), then the script >rotates the backups, otherwise reports via email that there was a backup >failure on that particular machine. Once in awhile I'll get one of those >partial backups, and that's what the previous full daily backups are for. Ah, I see. :) >If i get two or so in a row, I go hunting down why the machine is >failing(is it just turned off, That's just plain annoying, but it's funny when they come to you and ask for a recovery of some file they have been working on for the last 6 months. ;> >is the ethernet unplugged AGAIN, Damn janitors! >did the hard drive die last Friday and the user hasn't called me after 4 >days totell me their computer is broken?) That's annoying too, but just about as funny as turning it off. I like to send them to their boss to explain how much work they have accomplished in that case. Yet, if it is the boss, I just take my time getting a replacement. =P >Are we still on topic? :D Doesn't quite seem like it, but it's been interesting, nonetheless. ;) Scott.