From lyons@digitalvoodoo.org Thu Sep 25 20:50:47 2003 Return-Path: Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9CD3916A4B3 for ; Thu, 25 Sep 2003 20:50:47 -0700 (PDT) Received: from mail.digitalvoodoo.org (h00500469ace6.ne.client2.attbi.com [24.91.5.75]) by mx1.FreeBSD.org (Postfix) with ESMTP id B25B844001 for ; Thu, 25 Sep 2003 20:50:46 -0700 (PDT) (envelope-from lyons@digitalvoodoo.org) Received: from stray.dmz.digitalvoodoo.org (dmz1.digitalvoodoo.org [24.218.30.58]) by mail.digitalvoodoo.org (8.11.6/8.11.6) with ESMTP id h8Q3oWJ23571; Thu, 25 Sep 2003 23:50:32 -0400 Message-Id: <20030925234544.H2040@fgenl.qzm.qvtvgnyibbqbb.bet> Date: Thu, 25 Sep 2003 23:50:37 -0400 (EDT) From: "Timothy M. Lyons" To: FreeBSD-gnats-submit@freebsd.org Cc: tlyons@digitalvoodoo.org Subject: usr.bin/uname -s value always placed in first position >Number: 57231 >Category: bin >Synopsis: usr.bin/uname -s value always placed in first position >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: closed >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Sep 25 21:00:25 PDT 2003 >Closed-Date: Sat Nov 01 17:20:50 PST 2003 >Last-Modified: Sat Nov 01 17:20:50 PST 2003 >Originator: Timothy M. Lyons >Release: FreeBSD 5.1-RELEASE-p8 i386 >Organization: Digitalvoodoo, LLC >Environment: System: FreeBSD devil.dmz.digitalvoodoo.org 5.1-RELEASE-p8 FreeBSD 5.1-RELEASE-p8 #0: Thu Sep 25 14:06:35 EDT 2003 root@devil.dmz.digitalvoodoo.org:/usr/obj/usr/src/sys/DEVILKERN i386 >Description: I was fooling around with the output of uname this evening and happened to notice that no matter where you places the -s option, the value is placed in the first position. Normal Use: # uname -n -p -r devil.dmz.digitalvoodoo.org 5.1-RELEASE-p8 i386 Okay - now I want to insert the OS Name in position 2: # uname -n -s -p -r -s FreeBSD devil.dmz.digitalvoodoo.org 5.1-RELEASE-p8 i386 Same result using any other combination of options involving -s >How-To-Repeat: I repeated this on two 5.1 boxes with the same system state (updated 09/25 STABLE) >Fix: I wish I did. This seems as if it would be a trivial fix for someone who knows how to program. >Release-Note: >Audit-Trail: From: Oliver Eikemeier To: "Timothy M. Lyons" Cc: FreeBSD-gnats-submit@FreeBSD.org, tlyons@digitalvoodoo.org Subject: Re: bin/57231: usr.bin/uname -s value always placed in first position Date: Fri, 26 Sep 2003 06:29:21 +0200 Timothy M. Lyons wrote: > Okay - now I want to insert the OS Name in position 2: > # uname -n -s -p -r -s > FreeBSD devil.dmz.digitalvoodoo.org 5.1-RELEASE-p8 i386 # uname -snrmp | awk '{ print $2, $1, $5, $3, $1 }' devil.dmz.digitalvoodoo.org FreeBSD i386 5.1-RELEASE-p8 FreeBSD where snrmp = 12345, dosn't work with -v. From: Peter Pentchev To: "Timothy M. Lyons" Cc: bug-followup@FreeBSD.org Subject: Re: bin/57231: usr.bin/uname -s value always placed in first position Date: Fri, 26 Sep 2003 11:12:02 +0300 On Thu, Sep 25, 2003 at 11:50:37PM -0400, Timothy M. Lyons wrote: > > >Number: 57231 > >Category: bin > >Synopsis: usr.bin/uname -s value always placed in first position > >Originator: Timothy M. Lyons > >Environment: > System: FreeBSD devil.dmz.digitalvoodoo.org 5.1-RELEASE-p8 FreeBSD > 5.1-RELEASE-p8 #0: Thu Sep 25 14:06:35 > EDT 2003 root@devil.dmz.digitalvoodoo.org:/usr/obj/usr/src/sys/DEVILKERN i386 > > >Description: > I was fooling around with the output of uname this evening and > happened to notice that no matter where you places the -s option, > the value is placed in the first position. > Normal Use: > # uname -n -p -r > devil.dmz.digitalvoodoo.org 5.1-RELEASE-p8 i386 > Okay - now I want to insert the OS Name in position 2: > # uname -n -s -p -r -s > FreeBSD devil.dmz.digitalvoodoo.org 5.1-RELEASE-p8 i386 > Same result using any other combination of options involving -s I don't think the uname(1) command has ever paid any attention to the order in which the options have been specified. I think the uname(1) command-line arguments should be considered as on-off switches, not as formatting specifiers: you can only instruct uname(1) whether to display or not the specific characteristics, but the order is hardcoded. Are there any OS's where the uname(1) output is really dependent on the order of the command-line options? A couple of quick tests with several flavors of Linux showed the same behavior there... G'luck, Peter -- Peter Pentchev roam@ringlet.net roam@sbnd.net roam@FreeBSD.org PGP key: http://people.FreeBSD.org/~roam/roam.key.asc Key fingerprint FDBA FD79 C26F 3C51 C95E DF9E ED18 B68D 1619 4553 You have, of course, just begun reading the sentence that you have just finished reading. State-Changed-From-To: open->feedback State-Changed-By: kris State-Changed-When: Fri Oct 17 17:51:14 PDT 2003 State-Changed-Why: Feedback requested http://www.freebsd.org/cgi/query-pr.cgi?pr=57231 State-Changed-From-To: feedback->closed State-Changed-By: kris State-Changed-When: Sat Nov 1 17:20:43 PST 2003 State-Changed-Why: Feedback timeout http://www.freebsd.org/cgi/query-pr.cgi?pr=57231 >Unformatted: X-send-pr-version: 3.113 X-GNATS-Notify: