From owner-freebsd-bugs@FreeBSD.ORG Fri Sep 26 01:20:25 2003 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BF8D116A4C3 for ; Fri, 26 Sep 2003 01:20:25 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id CF19E4400B for ; Fri, 26 Sep 2003 01:20:24 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.9/8.12.9) with ESMTP id h8Q8KOFY041371 for ; Fri, 26 Sep 2003 01:20:24 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.9/8.12.9/Submit) id h8Q8KO9e041370; Fri, 26 Sep 2003 01:20:24 -0700 (PDT) (envelope-from gnats) Date: Fri, 26 Sep 2003 01:20:24 -0700 (PDT) Message-Id: <200309260820.h8Q8KO9e041370@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Peter Pentchev Subject: Re: bin/57231: usr.bin/uname -s value always placed in first position X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Peter Pentchev List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Sep 2003 08:20:25 -0000 The following reply was made to PR bin/57231; it has been noted by GNATS. 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.