Re: Q: extract database name from directory dump

From: John R Pierce <pierce(at)hogranch(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Q: extract database name from directory dump
Date: 2016-03-12 21:55:26
Message-ID: 56E4904E.3090706@hogranch.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 3/12/2016 1:40 PM, John R Pierce wrote:
> pg_restore -l junky | awk '/^;\wdbname: (.*)/{print $3}'

oops, pasted the wrong one, meant that one to be ...

pg_restore -l junky | awk '/^; +dbname: /{print $3}'

but I think the 2nd one is more robust

--
john r pierce, recycling bits in santa cruz

In response to

Browse pgsql-general by date

  From Date Subject
Next Message David G. Johnston 2016-03-12 21:59:05 Re: Q: extract database name from directory dump
Previous Message John R Pierce 2016-03-12 21:40:25 Re: Q: extract database name from directory dump