From owner-freebsd-questions@FreeBSD.ORG Mon Jun 30 10:43:17 2003 Return-Path: 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 B1DD737B401 for ; Mon, 30 Jun 2003 10:43:17 -0700 (PDT) Received: from mail.gmx.net (mail.gmx.de [213.165.64.20]) by mx1.FreeBSD.org (Postfix) with SMTP id 8FE0543FB1 for ; Mon, 30 Jun 2003 10:43:16 -0700 (PDT) (envelope-from mfromwald@gmx.at) Received: (qmail 22517 invoked by uid 65534); 30 Jun 2003 17:43:15 -0000 Received: from chello062178160230.10.14.vie.surfer.at (EHLO menterg) (62.178.160.230) by mail.gmx.net (mp008) with SMTP; 30 Jun 2003 19:43:15 +0200 From: "Moritz Fromwald" To: freebsd-questions@freebsd.org Date: Mon, 30 Jun 2003 19:43:33 +0200 MIME-Version: 1.0 Message-ID: <3F0092E5.13879.51ADA4E@localhost> Priority: normal X-mailer: Pegasus Mail for Windows (v4.11) Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Content-description: Mail message body Subject: Seperate fields in File X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: mfromwald@gmx.at List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jun 2003 17:43:18 -0000 Hello all, I have a text file, which contains several data sets, separated by a particular string ("-------.*=.*--") I need to write a script, which processes each of these data sets Can anyone push me in the right direction? Is it possible to simplify the following command in several lines run=`cat HI*.PM | grep -e '0,0' | grep 'Massenmails' | awk -F ',' {'print $3'} | awk -F ':' {'print $3'} | awk -F '\"' {'print $1'}` TIA & greez moritz fromwald