From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <5e98ce2e01a213c1498c3df04e10c326@plan9.bell-labs.com> From: David Presotto To: 9fans@cse.psu.edu Subject: Re: [9fans] Finding the object suffix In-Reply-To: <2004032510535500-74837@Symmetry.UUCP> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="upas-qrepoyajksaypjgsdydqpbswhn" Date: Thu, 25 Mar 2004 06:57:21 -0500 Topicbox-Message-UUID: 40dc715a-eacd-11e9-9e20-41e7f4b1d025 This is a multi-part message in MIME format. --upas-qrepoyajksaypjgsdydqpbswhn Content-Disposition: inline Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit first of all, $objtype is the target to compile for, not the type of the local cpu. You at least need to look at $cputype. The following would do it with one less process: sed -n 's/^O=(.*)/\1/p' /$cputype/mkfile --upas-qrepoyajksaypjgsdydqpbswhn Content-Type: message/rfc822 Content-Disposition: inline Received: from plan9.cs.bell-labs.com ([135.104.9.2]) by plan9; Thu Mar 25 06:00:54 EST 2004 Received: from mail.cse.psu.edu ([130.203.4.6]) by plan9; Thu Mar 25 06:00:51 EST 2004 Received: by mail.cse.psu.edu (CSE Mail Server, from userid 60001) id 9CEC619E6C; Thu, 25 Mar 2004 06:00:47 -0500 (EST) Received: from psuvax1.cse.psu.edu (psuvax1.cse.psu.edu [130.203.4.6]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id 9D03019B9F; Thu, 25 Mar 2004 06:00:37 -0500 (EST) X-Original-To: 9fans@cse.psu.edu Delivered-To: 9fans@cse.psu.edu Received: by mail.cse.psu.edu (CSE Mail Server, from userid 60001) id 975C719B6A; Thu, 25 Mar 2004 05:59:58 -0500 (EST) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.184]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id 69CCB19AE7 for <9fans@cse.psu.edu>; Thu, 25 Mar 2004 05:59:55 -0500 (EST) Received: from [212.227.126.179] (helo=mrelayng.kundenserver.de) by moutng.kundenserver.de with esmtp (Exim 3.35 #1) id 1B6SaZ-0006Me-00 for 9fans@cse.psu.edu; Thu, 25 Mar 2004 11:59:55 +0100 Received: from [80.140.17.110] (helo=t3x.org) by mrelayng.kundenserver.de with asmtp (TLSv1:EDH-RSA-DES-CBC3-SHA:168) (Exim 3.35 #1) id 1B6SaY-0002Wr-00 for 9fans@cse.psu.edu; Thu, 25 Mar 2004 11:59:54 +0100 Received: (from nmh@localhost) by t3x.org (8.11.6/8.11.6) id i2PAuaM74846; Thu, 25 Mar 2004 11:56:36 +0100 (CET) To: 9fans@cse.psu.edu From: Nils M Holm Message-ID: <2004032510535500-74837@Symmetry.UUCP> X-Mailer: NMail X-Provags-ID: kundenserver.de abuse@kundenserver.de auth:5b68ff8df1d89a0a7485e040b6c88401 Subject: [9fans] Finding the object suffix Sender: 9fans-admin@cse.psu.edu Errors-To: 9fans-admin@cse.psu.edu X-BeenThere: 9fans@cse.psu.edu X-Mailman-Version: 2.0.11 Precedence: bulk Reply-To: 9fans@cse.psu.edu List-Id: Fans of the OS Plan 9 from Bell Labs <9fans.cse.psu.edu> List-Archive: Date: Thu, 25 Mar 2004 11:53:55 +0100 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on psuvax1.cse.psu.edu X-Spam-Status: No, hits=0.1 required=5.0 tests=RCVD_IN_NJABL autolearn=no version=2.63 X-Spam-Level: I am currently writing an rc script that needs to know the object suffix of the architecture it is running on. Would the following code reliably return this suffix, or is there a better way? grep '^O=.$' /$objtype/mkfile | sed -e 's/O=//' Thanks, Nils. -- Nils M Holm -- http://www.t3x.org/nmh/ --upas-qrepoyajksaypjgsdydqpbswhn--