Re: Petition: Treat #!... shebangs as comments - Mailing list pgsql-general

From Francisco Olarte
Subject Re: Petition: Treat #!... shebangs as comments
Date
Msg-id CA+bJJbxgqhKEC24wyTX2MrGA3aXqf2ZGhdyQ=xQ2bco4Xf26rA@mail.gmail.com
Whole thread Raw
In response to Re: Petition: Treat #!... shebangs as comments  (Karsten Hilbert <Karsten.Hilbert@gmx.net>)
List pgsql-general
Hi Karsten:

On Fri, Jul 18, 2014 at 9:47 PM, Karsten Hilbert
<Karsten.Hilbert@gmx.net> wrote:
> Nice solution but that won't work on Windows ...

If "psql -f kk.psql" does, it works enough. ./kk.psql would not
notmally work on windows. It's been 12 years since I worked on it, but
IIRC although windows ( the OS ) recognized / as a path separator CMD
did not, so even if you set psql as a handler for .psql files it would
not work ( and, IIRC again, the customary way to exec that kind of
files would be 'kk', i.e. 'jj' not '.\jj.md' for a CMD file as windows
used to consider the CWD of the current drive before the PATH ). And
if you are using windows in POSIX mode with a bash shell it would
probably work.

Note the OP was not asking for a windows+unix shell script, but for a
psql + unix shell.

Francisco Olarte.


pgsql-general by date:

Previous
From: Francisco Olarte
Date:
Subject: Re: Petition: Treat #!... shebangs as comments
Next
From: Francisco Olarte
Date:
Subject: Re: Petition: Treat #!... shebangs as comments