All of lore.kernel.org
 help / color / mirror / Atom feed
From: Scott Taylor <scott@dctchambers.com>
To: linux-admin@vger.kernel.org
Subject: Re: counting shell args
Date: Mon, 16 Dec 2002 12:53:14 -0800	[thread overview]
Message-ID: <5.1.1.6.0.20021216124934.01c406e8@mustang> (raw)
In-Reply-To: <Pine.LNX.4.33.0212161545230.25857-100000@router.windsormac hine.com>

At 12:47 PM 12/16/02, Mike Dresser wrote:
>On Mon, 16 Dec 2002, Scott Taylor wrote:
>
> > 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?
>
>$#
>
>for example:
>
>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.


  parent reply	other threads:[~2002-12-16 20:53 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-12-16 20:36 counting shell args 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 [this message]
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
     [not found]                 ` <Pine.LNX.4.33.0212171005410.13631-100000@router.windsormac hine.com>
2002-12-17 15:36                   ` SysAdmin rants [was Re: counting shell args] Scott Taylor
2002-12-17  3:11 ` counting shell args 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
  -- strict thread matches above, loose matches on Subject: below --
2002-12-16 22:04 johnjulian1
2002-12-17 15:05 ` Mike Dresser

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5.1.1.6.0.20021216124934.01c406e8@mustang \
    --to=scott@dctchambers.com \
    --cc=linux-admin@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.