From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from server2.sitesell.com ([216.95.221.3]) by speech.braille.uwo.ca with smtp (Exim 3.36 #1 (Debian)) id 1DGMV5-0003IT-00 for ; Tue, 29 Mar 2005 14:35:43 -0500 Received: (qmail 28094 invoked by uid 223); 29 Mar 2005 19:35:11 -0000 Received: from 70.81.94.15 by server2.sitesell.com (envelope-from , uid 101) with qmail-scanner-1.25 (clamdscan: 0.81/685. spamassassin: 3.0.1. Clear:RC:1(70.81.94.15):. Processed in 0.037653 secs); 29 Mar 2005 19:35:11 -0000 Received: from [192.168.192.2] (modemcable015.94-81-70.mc.videotron.ca [70.81.94.15]) by server2.sitesell.com ([216.95.221.3]) with ESMTP via TCP; 29 Mar 2005 19:35:11 -0000 Date: Tue, 29 Mar 2005 14:35:11 -0500 (EST) From: Trevor Astrope To: "Speakup is a screen review system for Linux." In-Reply-To: <000801c53493$fbd20890$4e31e444@nedelko83f1172> Message-ID: References: <000801c53493$fbd20890$4e31e444@nedelko83f1172> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed 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:35:44 -0000 Try something like this: date +"%d" --date="`date +\"%b 1 1 month\"` 1 day ago" There's probably a simpler way using the date command, but that should work. Hth, Trevor On Tue, 29 Mar 2005, 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 > >