Subject: Re: shell script
To: None <port-mac68k@netbsd.org>
From: gabriel rosenkoetter <gr@eclipsed.net>
List: port-mac68k
Date: 03/04/2000 02:44:43
On Fri, Mar 03, 2000 at 08:12:21PM -0500, Steve Revilak wrote:
> > $var = `date | awk {'print 1$'}`
> > 
> > Um, looks more like a line from a perl script to me than a csh
> > script...  Does it really work with csh?
> 
> Yes, given a small syntactic change:
> 
>    (8:0)eris:~>set var=`date | awk '{print $1}'`
>    (9:0)eris:~>echo $var
>    Fri

Maybe I'm missing something here, but what's wrong with date +%a?
There's no need to start an awk process... date can give you your date
(almost) however you like it, certainly more ways than awk on the
standard output of date can.

       ~ g r @ eclipsed.net