Re: [HACKERS] regress.sh

From: "Patrick Welche" <prlw1(at)newn(dot)cam(dot)ac(dot)uk>
To: jwieck(at)debis(dot)com
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: [HACKERS] regress.sh
Date: 1999-06-14 14:22:09
Message-ID: E10tXcn-0001ei-00@quartz.newn.cam.ac.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Jan Wieck wrote:
>
> Looking at the actual sources I wonder why it can cause any
> problems. At the very beginning I've added
>
> portname=$1
> export portname
> shift
>
> That variable is used ONLY ONCE in the awk line you're
> quoting above. Prior to my changes, $1 was directly used as
> argument to awk and all remaining args ignored silently by
> regress.sh.

Ah! portname=$1 means take $1 command line argument that the script
was called by.

awk -F\- '{ split($3,a,/[0-9]/); printf"%s-%s", $1, a[1] }'

$1 here is the 1st variable from the line split by awk. ie., $1 in the
first case is "sh" syntax, $1 in second case is "awk" syntax.

So now that I know there is no intentional magic, we can go back successfully
with

39c39
< SYSTEM=`../../config.guess | awk -F\- '{ split($3,a,/[0-9]/); printf"%s-%s", $portname, a[1] }'`
---
> SYSTEM=`../../config.guess | awk -F\- '{ split($3,a,/[0-9]/); printf"%s-%s", $1, a[1] }'`

the only remaining query being:

*** expected/random.out Sun Aug 30 19:50:58 1998
--- results/random.out Mon Jun 14 15:18:04 1999
***************
*** 19,23 ****
WHERE random NOT BETWEEN 80 AND 120;
random
------
! (0 rows)

--- 19,24 ----
WHERE random NOT BETWEEN 80 AND 120;
random
------
! 124
! (1 row)

?

Cheers,

Patrick

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 1999-06-14 14:22:54 Re: [HACKERS] regress.sh
Previous Message Tatsuo Ishii 1999-06-14 14:07:15 Re: [HACKERS] Postgres 6.5 beta2 and beta3 problem