From mboxrd@z Thu Jan 1 00:00:00 1970 To: 9fans@cse.psu.edu Subject: Re: [9fans] sed From: rog@vitanuova.com MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="upas-hhrocwrhkneckqafiahhgfrlct" Message-Id: <20010104173610.CB6E6199D7@mail.cse.psu.edu> Date: Thu, 4 Jan 2001 18:39:39 +0000 Topicbox-Message-UUID: 442163ba-eac9-11e9-9e20-41e7f4b1d025 This is a multi-part message in MIME format. --upas-hhrocwrhkneckqafiahhgfrlct Content-Disposition: inline Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit i always used: grep -n '^' file1 > file2 but that's just me, i guess. --upas-hhrocwrhkneckqafiahhgfrlct Content-Type: message/rfc822 Content-Disposition: inline Return-Path: <9fans-admin@cse.psu.edu> Received: from punt-1.mail.demon.net by mailstore for rog@vitanuova.com id 978629002:10:23315:7; Thu, 04 Jan 2001 17:23:22 GMT Received: from psuvax1.cse.psu.edu ([130.203.4.6]) by punt-1.mail.demon.net id aa1129401; 4 Jan 2001 17:23 GMT Received: from psuvax1.cse.psu.edu (psuvax1.cse.psu.edu [130.203.8.6]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id 1779A199EF; Thu, 4 Jan 2001 12:23:07 -0500 (EST) Received: from pixar.pixar.com (pixar.pixar.com [138.72.10.20]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id 4D781199D7 for <9fans@cse.psu.edu>; Thu, 4 Jan 2001 12:22:00 -0500 (EST) Received: from marvin.pixar.com (marvin.pixar.com [138.72.30.83]) by pixar.pixar.com (8.9.3/8.9.3) with ESMTP id JAA16949 for <9fans@cse.psu.edu>; Thu, 4 Jan 2001 09:21:58 -0800 (PST) Received: (from td@localhost) by marvin.pixar.com (8.9.3/8.9.3) id JAA155979 for 9fans@cse.psu.edu; Thu, 4 Jan 2001 09:21:59 -0800 (PST) Message-Id: <10101040921.ZM156152@marvin> In-Reply-To: William Staniewicz "[9fans] sed" (Jan 4, 3:45am) References: <20010104024926.C82C1199DC@mail.cse.psu.edu> X-Mailer: Z-Mail (3.2.3 08feb96 MediaMail) To: cse.psu.edu!9fans Subject: Re: [9fans] sed Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: cse.psu.edu!9fans-admin Errors-To: 9fans-admin@cse.psu.edu X-BeenThere: 9fans@cse.psu.edu X-Mailman-Version: 2.0 Precedence: bulk Reply-To: cse.psu.edu!9fans List-Id: Fans of the O/S Plan 9 from Bell Labs <9fans.cse.psu.edu> List-Archive: Date: Thu, 4 Jan 2001 09:21:58 -0800 > Is there a different way to do the following under Plan9? > sed = file1|sed 'N;s/\n/\ /' >file2 > or > cat -n file1 >file2 Does awk '{print NR "\t" $0}' file1 >file2 not work? --upas-hhrocwrhkneckqafiahhgfrlct--