bin/57231: usr.bin/uname -s value always placed in first position

Peter Pentchev roam at ringlet.net
Fri Sep 26 01:20:25 PDT 2003


The following reply was made to PR bin/57231; it has been noted by GNATS.

From: Peter Pentchev <roam at ringlet.net>
To: "Timothy M. Lyons" <lyons at digitalvoodoo.org>
Cc: bug-followup at 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 at 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 at ringlet.net    roam at sbnd.net    roam at 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.


More information about the freebsd-bugs mailing list