Re: Unportable use of uname in pg_upgrade test script - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Unportable use of uname in pg_upgrade test script
Date
Msg-id 3328.1348938372@sss.pgh.pa.us
Whole thread Raw
In response to Re: Unportable use of uname in pg_upgrade test script  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: Unportable use of uname in pg_upgrade test script  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-hackers
Andrew Dunstan <andrew@dunslane.net> writes:
> The trouble with uname -s is that its output is a bit variable. I think 
> this will work:

>      testhost=`uname -a | sed 's/.* //'`

What do you mean by "a bit variable"?  And why would that fix it?  The
output of -a is *defined* to be the same as -s followed by other stuff.
The reference page I'm looking at also points out that the -s string
can contain embedded blanks.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: is JSON really "a type" (Re: data to json enhancements)
Next
From: Andrew Dunstan
Date:
Subject: Re: Unportable use of uname in pg_upgrade test script