Search Postgresql Archives

]OT] Parsing postgresql.conf archive_command

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

 



Hello,


I'd like to get the path configured for archive_command in a shell script

I've used a file with following content as an example (postgresql.conf),

# archive_command = cp %p /backup/%r
  # archive_command = cp %p /backup/%r
        # archive_command = cp %p /backup/%r
#archive_command = cp %p /backup/%r
   archive_command = 'cp %p /backup/wal/%f'

This is what I been trying.
$ awk '!/[ \t]*#/ { sub(/%f$/, "", $NF); print $NF }' postgresql.conf

and I get
/backup/wal/%f'

Any idea how to get rid of "%f'"  so that I get only?
/backup/wal/

My regexp skills are sad :-)

Steve

[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