🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: ca.unix
Article #1122

Re: shellscript???

#1122
From: Tim Pesce
Date: Sun, 22 May 1994 19:02
23 lines
1275 bytes
From: tpesce@kaiwan.com (Tim Pesce)
Date: 22 May 1994 12:02:32 -0700

In article <jorcasCq6Gx5.AI1@netcom.com>,
Jorge E Castillo Jr <jorcas@netcom.com> wrote:
>How do I chek if a shell script has received arguments (that $1 exists).

First of all, it will depend on the shell you are using.  I am assuming
you are using the Bourne shell.

You can query the $# variable.  This is the number of command-line
arguments passed to the shell script.

Hope this helps!

-- 
Tim Pesce
tpesce@kaiwan.com
--
|Fidonet:  Tim Pesce 1:103/1
|Internet: Tim.Pesce@1.sasbbse.com
|
| Standard disclaimer: The views of this user are strictly his own.
Technical Details
Message-ID: <446_9405232211@sasbbse.com>
Path: arc1-ca.pugleaf.net!bga.com!news.sprintlink.net!get.hooked.net!decwrl!ames!agate!news.ossi.com!ihnp4.ucsd.edu!library.ucla.edu!csulb.edu!csus.edu!netcom.com!netcomsv!sasbbse!1!Tim.Pesce

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10183f,dea6746deb3cf8b5
X-Google-Attributes: gid10183f,public
X-Google-ArrivalTime: 1994-05-22 12:02:32 PST
Path: arc1-ca.pugleaf.net!bga.com!news.sprintlink.net!get.hooked.net!decwrl!ames!agate!news.ossi.com!ihnp4.ucsd.edu!library.ucla.edu!csulb.edu!csus.edu!netcom.com!netcomsv!sasbbse!1!Tim.Pesce
From: Tim.Pesce@1.sasbbse.com (Tim Pesce)
Date: 22 May 94 11:02:32 -0800
Newsgroups: ca.unix
Subject: Re: shellscript???
Message-ID: <446_9405232211@sasbbse.com>
X-Mail-Agent: GIGO unreg at sasbbse vsn 0.99w32
Organization: Relational Development Corporation
Lines: 24