Re: Dump database more than 1 flat file

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

 



Hi,

On Dienstag, 18. Dezember 2007, Alvaro Herrera wrote:
| A.Burbello wrote:
| > If doesn't have another way, how can I put the
| > "header" in the begin of file without open?
| > With "cat >>" command I put in the end.
|
| Don't -- you can put the header in a separate file and do something like
|
| (cat header-file ; cat split-1 ; cat tail-file ) | psql

even simpler: "cat" usually takes any number of file name arguments,
so usually you simply can do

  cat header-file split-1 tail-file | psql

No need for parentheses and starting a new process for each file.

Ciao,
Thomas

-- 
Thomas Pundt <thomas.pundt@xxxxxxxxxxxx> ---- http://rp-online.de/ ----

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

               http://www.postgresql.org/docs/faq

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux