Search Postgresql Archives

Re: Q: extract database name from directory dump

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux