From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from central.cis.upenn.edu ([130.91.6.1]) by archone.tamu.edu with SMTP id <22544>; Fri, 28 Jun 1991 15:39:05 -0500 Received: from SAUL.CIS.UPENN.EDU by central.cis.upenn.edu id AA22159; Fri, 28 Jun 91 16:30:22 -0400 Return-Path: Received: from LOCALHOST by saul.cis.upenn.edu id AA16256; Fri, 28 Jun 91 16:30:21 EDT Posted-Date: Fri, 28 Jun 91 16:30:20 -0400 Message-Id: <9106282030.AA16256@saul.cis.upenn.edu> To: Byron Rakitzis Cc: mjd@saul.cis.upenn.edu, rc@archone.tamu.edu Subject: Re: biff? In-Reply-To: Your message of "Fri, 28 Jun 91 15:19:15 CDT." <91Jun28.151927cdt.22542@archone.tamu.edu> Date: Fri, 28 Jun 1991 15:30:20 -0500 From: Mark-Jason Dominus > fn getsize { # Get the size of $mail in bytes > size = `{ls -l $mail} > size = $size(4) > if (~ $#size 0) # No output from ls? > size = 0 > $1 = $size > } Does this work at all? On my machine $size(4) is `mjd', because there's a double space between the permissions and the link count except when the number of links exceeds 9. -rw------- 1 mjd 0 Jun 28 16:24 /var/spool/mail/mjd In fact, it's very difficult to get the size, because it's $size(17), unless the size exceeds 9 bytes, in which case it's $size(16), unless the size exceeds 99 bytes, inwhich case it's $size(15)... Who was it who said that the $ifs behavior was doing the right thing?