From mboxrd@z Thu Jan 1 00:00:00 1970 From: Scott Taylor Subject: Re: counting shell args Date: Mon, 16 Dec 2002 13:05:18 -0800 Sender: linux-admin-owner@vger.kernel.org Message-ID: <5.1.1.6.0.20021216125932.01c63ca8@mustang> References: <5.1.1.6.0.20021216124934.01c406e8@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 12:57 PM 12/16/02, Mike Dresser wrote: >On Mon, 16 Dec 2002, Scott Taylor wrote: > > > >if [ $# -lt 2 ]; then > > > > Man! That's been driving me nuts for like an hour now! Thanks. It's > > still driving me nuts why I couldn't find it in man bash or man test > though. > ># Expands to the number of positional parameters in > decimal. I saw that, and chose to ignore it, last time that happens. lol >Doesn't exactly jump out and say, "HEY, I COUNT PARAMETERS" No kidding. Heh, it's what happens when you run such a tight ship you rarely need to do anything but play doom/quake to run those network tests. =P >I looked for many hours for that one myself when making a backup script. >Very annoying :) Yeah, very. I remember once about 10 years ago someone told me that if I study UNIX and can't find something, it's because the attitude is: "you don't need to know that!" Now I know what he meant. Good thing it's no longer like that. LMAO. Cheers Mike.