All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: counting shell args
@ 2002-12-16 22:04 johnjulian1
  2002-12-17 15:05 ` Mike Dresser
  0 siblings, 1 reply; 15+ messages in thread
From: johnjulian1 @ 2002-12-16 22:04 UTC (permalink / raw)
  To: Mike Dresser, Scott Taylor; +Cc: linux-admin

Just a note responding to your comment about this being for backing up windows boxes. I back up ours with a script that does it in steps testing for errors along the way.
ping winbox
mount winbox /mnt/winbox
rsync /mnt/winbox user@remotebox

this doesn't compress but does give me a lot of error checking. The remote box in my case is a Solaris box with a big raid and tape jukebox.

If you're interested I'll email you the script.

Mike Dresser <mdresser_l@windsormachine.com> 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.
>
>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.
>
>If i get two or so in a row, I go hunting down why the machine is
>failing(is it just turned off, is the ethernet unplugged AGAIN, did the
>hard drive die last Friday and the user hasn't called me after 4 days to
>tell me their computer is broken?)
>
>Are we still on topic? :D
>
>Mike
>
>-
>To unsubscribe from this list: send the line "unsubscribe linux-admin" in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

__________________________________________________________________
The NEW Netscape 7.0 browser is now available. Upgrade now! http://channels.netscape.com/ns/browsers/download.jsp 

Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/

^ permalink raw reply	[flat|nested] 15+ messages in thread
* counting shell args
@ 2002-12-16 20:36 Scott Taylor
  2002-12-16 20:47 ` Mike Dresser
                   ` (3 more replies)
  0 siblings, 4 replies; 15+ messages in thread
From: Scott Taylor @ 2002-12-16 20:36 UTC (permalink / raw)
  To: linux-admin

I'm sure I've seen, probably even use it before, but I can't remember or 
find it now; does anyone remember how to count the number of arguments sent 
to a bash script?

Like "if [ -z $3 ]; then" ... of corse that's for testing argument 3 
exists, but how do I test if 3 arguments and only 3, are passed to the 
script (or 1 or 10 or whatever).

Don't you just hate it when that happens. =P


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2002-12-18  4:13 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-12-16 22:04 counting shell args johnjulian1
2002-12-17 15:05 ` Mike Dresser
  -- strict thread matches above, loose matches on Subject: below --
2002-12-16 20:36 Scott Taylor
2002-12-16 20:47 ` Mike Dresser
     [not found] ` <Pine.LNX.4.33.0212161545230.25857-100000@router.windsormac hine.com>
2002-12-16 20:53   ` Scott Taylor
2002-12-16 20:57     ` Mike Dresser
     [not found]     ` <Pine.LNX.4.33.0212161555240.25857-100000@router.windsormac hine.com>
2002-12-16 21:05       ` Scott Taylor
2002-12-16 21:12         ` Mike Dresser
     [not found]         ` <Pine.LNX.4.33.0212161607130.25857-100000@router.windsormac hine.com>
2002-12-16 21:38           ` Scott Taylor
2002-12-16 21:49             ` Mike Dresser
     [not found]             ` <Pine.LNX.4.33.0212161645140.3389-100000@router.windsormach ine.com>
2002-12-16 22:18               ` Scott Taylor
2002-12-17 15:15                 ` Mike Dresser
2002-12-17  3:11 ` dashielljt
     [not found] ` <Pine.LNX.4.50.0212162211130.217-100000@athame.gmpexpress.n et>
2002-12-17 15:38   ` Scott Taylor
2002-12-18  4:13     ` dashielljt

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.