Re: Unportable use of uname in pg_upgrade test script

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: Unportable use of uname in pg_upgrade test script
Date: 2012-09-29 17:06:12
Message-ID: 3328.1348938372@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andrew Dunstan <andrew(at)dunslane(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2012-09-29 17:33:49 Re: Unportable use of uname in pg_upgrade test script
Previous Message Andrew Dunstan 2012-09-29 16:40:04 Re: is JSON really "a type" (Re: data to json enhancements)