From: | Thom Brown <thombrown(at)gmail(dot)com> |
---|---|
To: | Jaume Calm <jaume(at)isac(dot)cat> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: I need to take metadata from a shell script. |
Date: | 2010-05-06 15:11:56 |
Message-ID: | o2jbddc86151005060811zb40326e7ta2fc49f991761cd6@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On 6 May 2010 08:57, Jaume Calm <jaume(at)isac(dot)cat> wrote:
> Hi! I was searching for a command like pg_dumpall but with the difference
> that I don’t want a single file for all databases, i would like to have a
> file for each one.
>
>
>
> I couldn’t fins such command, so the only option I see is to write a shell
> script with a loop for all the DBs. The problem is that I’m unable to find
> the way to obtain the DBs’ names in a shell script. Can someone help me with
> this?
>
>
>
> Best regards and thank you all for your time.
>
>
> You could try:
psql -l | cut -d "|" -f 1 | tail -n +4 | head -n -2
A bit hacky, and there might be a better way.
Regards
Thom
From | Date | Subject | |
---|---|---|---|
Next Message | Scott Mead | 2010-05-06 15:13:36 | Re: I need to take metadata from a shell script. |
Previous Message | A. Kretschmer | 2010-05-06 15:04:47 | Re: Need a help in regexp |