Mailing List Archive

Support open source code!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: REGEXP in perl questiion



On Wed, May 23, 2001 at 01:42:10AM -0800, twistedhammer@example.com wrote:
> Do you *need* to use perl? awk can handle this without the fuss..
> 'BEGIN{ FS=" ";} { print "The program called by cron was ", $4; }'

"Without the fuss" translates to

basename `head -1 /var/spool/mail/cronthing | awk 'BEGIN{ FS=" ";} { print $4; }'`

As opposed to

perl -M File::Basename -nae 'print basename($F[3]); last' <
/var/spool/mail/cronthing

I would suggest you need to use Perl. And who needs a regular expression?

-- 
Um. There is no David conspiracy. Definitely not. No Kate conspiracy either.
No. No, there is definitely not any sort of David conspiracy, and we are
definitely *not* in league with the Kate conspiracy. Who doesn't exist. And
nor does the David conspiracy. No. No conspiracies here. - Thorfinn, ASR


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links