From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pop-a065d23.pas.sa.earthlink.net ([207.217.121.254]) by speech.braille.uwo.ca with esmtp (Exim 3.36 #1 (Debian)) id 1DGMfR-0003io-00 for ; Tue, 29 Mar 2005 14:46:25 -0500 Received: from user-10ib9c5.biz.mindspring.com ([65.37.165.133] helo=bruzos) by pop-a065d23.pas.sa.earthlink.net with esmtp (Exim 3.36 #10) id 1DGMfL-0006Eq-00 for speakup@braille.uwo.ca; Tue, 29 Mar 2005 11:46:20 -0800 Received: by bruzos (Postfix, from userid 501) id C5C7B10039; Tue, 29 Mar 2005 14:46:16 -0500 (EST) Date: Tue, 29 Mar 2005 14:46:16 -0500 From: David Bruzos To: "Speakup is a screen review system for Linux." Message-ID: <20050329194616.GA18416@bruzos.org> References: <000801c53493$fbd20890$4e31e444@nedelko83f1172> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <000801c53493$fbd20890$4e31e444@nedelko83f1172> User-Agent: Mutt/1.4.1i Subject: Re: how to get the last word from file X-BeenThere: speakup@braille.uwo.ca X-Mailman-Version: 2.1.5 Precedence: list Reply-To: "Speakup is a screen review system for Linux." List-Id: "Speakup is a screen review system for Linux." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Mar 2005 19:46:25 -0000 This command will do it on my system: cal | tr ' ' '\n' | tail -n 2 I have to put 2 as arg for tail, because my cal command prints a blank line at the end... DB On Tue, Mar 29, 2005 at 12:17:43PM -0700, Ned wrote: > Hi list, > I am using the cal command to get current month. What I need for my shell script is how many days are there in the current month, that is, the last listed date for that month is that very number. > How can I get that number? > cal | tail -1 > and then what? > > Many thanks! > Ned > _______________________________________________ > Speakup mailing list > Speakup@braille.uwo.ca > http://speech.braille.uwo.ca/mailman/listinfo/speakup