From: | John McKown <john(dot)archie(dot)mckown(at)gmail(dot)com> |
---|---|
To: | Andrew Pennebaker <andrew(dot)pennebaker(at)gmail(dot)com> |
Cc: | PostgreSQL General <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Petition: Treat #!... shebangs as comments |
Date: | 2014-07-18 20:41:16 |
Message-ID: | CAAJSdjit7L9E-BNK4ch2tGd78BSEH1aMb1cBZLHtskYp9DUpJg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Fri, Jul 18, 2014 at 2:37 PM, Andrew Pennebaker
<andrew(dot)pennebaker(at)gmail(dot)com> wrote:
> As a workaround, I can use this shebang hack:
>
> $ cat hello.psql
> --() { :; }; exec psql -f "$0"
I hope that isn't patented! <grin?> "Cause I'm gonna use it when I need to.
>
> SELECT 'Hello World!';
>
> $ ./hello.psql
> ?column?
> --------------
> Hello World!
> (1 row)
>
> $ psql -f hello.psql
> ?column?
> --------------
> Hello World!
> (1 row)
>
> But I would prefer to use a traditional (#!/usr/bin/env psql -f) shebang. It
> took a few hours on irc to hack this one together.
FWIW - I like #! also. Even though it may cause the Windows users to
want something equivalent. Assuming there are any Windows people who
really use a command prompt.
--
There is nothing more pleasant than traveling and meeting new people!
Genghis Khan
Maranatha! <><
John McKown
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2014-07-18 20:53:39 | Re: Petition: Treat #!... shebangs as comments |
Previous Message | Karsten Hilbert | 2014-07-18 19:47:32 | Re: Petition: Treat #!... shebangs as comments |