Re: Petition: Treat #!... shebangs as comments
От | John McKown |
---|---|
Тема | Re: Petition: Treat #!... shebangs as comments |
Дата | |
Msg-id | CAAJSdjit7L9E-BNK4ch2tGd78BSEH1aMb1cBZLHtskYp9DUpJg@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Petition: Treat #!... shebangs as comments (Andrew Pennebaker <andrew.pennebaker@gmail.com>) |
Ответы |
Re: Petition: Treat #!... shebangs as comments
|
Список | pgsql-general |
On Fri, Jul 18, 2014 at 2:37 PM, Andrew Pennebaker <andrew.pennebaker@gmail.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
В списке pgsql-general по дате отправления: