From owner-freebsd-questions@FreeBSD.ORG Wed Apr 25 07:27:16 2007 Return-Path: X-Original-To: freebsd-questions@FreeBSD.ORG Delivered-To: freebsd-questions@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3FDCD16A406 for ; Wed, 25 Apr 2007 07:27:16 +0000 (UTC) (envelope-from kline@tao.thought.org) Received: from tao.thought.org (dsl231-043-140.sea1.dsl.speakeasy.net [216.231.43.140]) by mx1.freebsd.org (Postfix) with ESMTP id E360C13C45A for ; Wed, 25 Apr 2007 07:27:15 +0000 (UTC) (envelope-from kline@tao.thought.org) Received: from tao.thought.org (localhost [127.0.0.1]) by tao.thought.org (8.13.8/8.13.1) with ESMTP id l3P7TFIQ065894 for ; Wed, 25 Apr 2007 00:29:15 -0700 (PDT) (envelope-from kline@tao.thought.org) Received: (from kline@localhost) by tao.thought.org (8.13.8/8.13.1/Submit) id l3P7TF0G065893 for freebsd-questions@FreeBSD.ORG; Wed, 25 Apr 2007 00:29:15 -0700 (PDT) (envelope-from kline) Date: Wed, 25 Apr 2007 00:29:14 -0700 From: Gary Kline To: FreeBSD Mailing List Message-ID: <20070425072914.GA65634@thought.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.2i X-Organization: Thought Unlimited. Public service Unix since 1986. X-Of_Interest: Observing twenty years of service to the Unix community Cc: Subject: first of misc questions.... 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: Wed, 25 Apr 2007 07:27:16 -0000 Guys, This is an awk-type question. Hopefully a one-liner. If I need to use #!/usr/bin/awk and a BEGIN/END (or whatever it is), that's okay... I want to do an ls -l in a /home/kline/ and find and edit files that are dated (let's say) Apr 19 or Mar 26. This works to print $9 the filenames. ls -l| awk '{if ($6 == "Apr" && $7 == 19 || $6 == "Mar" && $7 == 26 ) print $9}' What's the final part to get awk to vi $9? Or another pipe and xargs and "vi"? Nothing simple works, so thanks for any clues! gary -- Gary Kline kline@thought.org www.thought.org Public Service Unix