Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 5 Sep 2006 15:36:09 -0700 (PDT)
From:      ann kok <annkok2001@yahoo.com>
To:        Paul Schmehl <pauls@utdallas.edu>, freebsd-questions@freebsd.org
Subject:   Re: script help
Message-ID:  <20060905223609.22009.qmail@web53308.mail.yahoo.com>
In-Reply-To: <DFCA4408B57615F7FAF95B0E@utd59514.utdallas.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
Dear Paul

Thank you for your mail

I want to run a script xx seconds automatically

but cronjob is limited minutes

Thank you

--- Paul Schmehl <pauls@utdallas.edu> wrote:

> 
> 
> --On Tuesday, September 05, 2006 11:16:26 -0700 ann
> kok 
> <annkok2001@yahoo.com> wrote:
> 
> > Hi all
> >
> > I would like to ask script question
> >
> > 1/ if i use the script to run within 1 minute, I
> can't
> > run it in the cronjob. how can I run this script
> > automatically?
> >
> I don't understand what you mean here.  Are you
> asking how to run a cronjob 
> more than once a minute?
> 
> > 2/ I have file "file.txt" as below, there are two
> > fields.
> >
> > 4 999
> > 10 200
> > 15 400
> > 60 900
> >
> > I write "awk script" to exact field 2 if the field
> 1
> > less than 10 and put it in the file "result.txt".
> but
> > i am not successful!
> >
> > awk '{
> >                     if ($1 > 10)
> > $2="this is result $2 when the feild 1 less than
> 10"
> > }' < file.txt > result.txt
> >
> > result.txt
> >
> > this is result $2 when the feild 1 less than 10
> > this is result $2 when the feild 1 less than 10
> >
> >
> > but i would like the result as
> >
> > this is result 999 when the feild 1 less than 10
> > this is result 200 when the feild 1 less than 10
> >
> awk '{
>                      if ($1 > 10)
> $2="this is result "$2" when the feild 1 less than
> 10"
>  }' < file.txt > result.txt
> 
> If you want awk to return the value of $2, don't
> quote it.
> 
> Paul Schmehl (pauls@utdallas.edu)
> Adjunct Information Security Officer
> The University of Texas at Dallas
> http://www.utdallas.edu/ir/security/
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060905223609.22009.qmail>