From owner-freebsd-questions@FreeBSD.ORG Tue Sep 5 22:36:23 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B0D9D16A4DD for ; Tue, 5 Sep 2006 22:36:23 +0000 (UTC) (envelope-from annkok2001@yahoo.com) Received: from web53308.mail.yahoo.com (web53308.mail.yahoo.com [206.190.49.98]) by mx1.FreeBSD.org (Postfix) with SMTP id 176AF43D77 for ; Tue, 5 Sep 2006 22:36:14 +0000 (GMT) (envelope-from annkok2001@yahoo.com) Received: (qmail 22011 invoked by uid 60001); 5 Sep 2006 22:36:09 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=N3oOuKH4NrRzy0j6+9qjB1IQJj0UXXbHnGTnQpQTWkDQfpKP56Wfnaw06hwIieJFAIjciMO0CJD5l9YP8Lf6d9LvyDYGiFBMj3xK26gyX0a5oAvSsTaF7kxTKgHHtrdF4D7DwOUrlHuiJGwyexx7ETHoh1Q7Gjj7M8sexdSYFPk= ; Message-ID: <20060905223609.22009.qmail@web53308.mail.yahoo.com> Received: from [67.55.28.12] by web53308.mail.yahoo.com via HTTP; Tue, 05 Sep 2006 15:36:09 PDT Date: Tue, 5 Sep 2006 15:36:09 -0700 (PDT) From: ann kok To: Paul Schmehl , freebsd-questions@freebsd.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Cc: Subject: Re: script help X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Sep 2006 22:36:23 -0000 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 wrote: > > > --On Tuesday, September 05, 2006 11:16:26 -0700 ann > kok > 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