Date: Wed, 25 Apr 2007 00:29:14 -0700 From: Gary Kline <kline@tao.thought.org> To: FreeBSD Mailing List <freebsd-questions@FreeBSD.ORG> Subject: first of misc questions.... Message-ID: <20070425072914.GA65634@thought.org>
next in thread | raw e-mail | index | archive | help
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/<directory> 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 <what> "vi"? Nothing simple works, so thanks for any clues! gary -- Gary Kline kline@thought.org www.thought.org Public Service Unix
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070425072914.GA65634>