From owner-freebsd-questions@FreeBSD.ORG Thu Oct 28 20:06:54 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 81829106566C for ; Thu, 28 Oct 2010 20:06:54 +0000 (UTC) (envelope-from prvs=0910e2a60b=johnl@iecc.com) Received: from gal.iecc.com (gal.iecc.com [64.57.183.53]) by mx1.freebsd.org (Postfix) with ESMTP id 174868FC13 for ; Thu, 28 Oct 2010 20:06:53 +0000 (UTC) Received: (qmail 35191 invoked from network); 28 Oct 2010 19:40:12 -0000 Received: from mail1.iecc.com (64.57.183.56) by mail1.iecc.com with QMQP; 28 Oct 2010 19:40:12 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple; d=iecc.com; h=date:message-id:from:to:subject:in-reply-to:cc:mime-version:content-type:content-transfer-encoding:vbr-info; s=1fb6.4cc9d19c.k1010; i=johnl@user.iecc.com; bh=72gpE+zF1icrGdAgzzcNLy5ymgnHgVTqbUNUxJym4Qs=; b=NVgAsrZFEi/ehjUeI7P7stOCEe101uuqZAeDH0f0XsCeu/EYV5wkWApHDm58z16beQwj5LjonzI/1GBNotXCDAcw/YUh2eWB/w6DNyNoVcTAtql3JeowfOqV/WpSXDkRJgYzfYciBeAlw7VVECu/JecGEfDQ6fp2X99pi6Lcm0M= VBR-Info: md=iecc.com; mc=all; mv=dwl.spamhaus.org Date: 28 Oct 2010 19:40:12 -0000 Message-ID: <20101028194012.8117.qmail@joyce.lan> From: John Levine To: freebsd-questions@freebsd.org In-Reply-To: <20101028160110.GA71713@guilt.hydra> Organization: X-Headerized: yes Mime-Version: 1.0 Content-type: text/plain; charset=utf-8 Content-transfer-encoding: 7bit Cc: perrin@apotheon.com Subject: Re: [OT] writing filters in sh 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: Thu, 28 Oct 2010 20:06:54 -0000 >I was hoping for a generalized, simple idiom for this, rather than >needing to implement it myself, for demonstration purposes ---------------------------------------- #!/bin/sh cat "$@" | while read x do echo "I saw $x" done ---------------------------------------- Sheesh. R's, John