tech-userlevel archive

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

Re: Alternative to hash-bang



On Fri, Jul 18, 2014 at 04:22:59PM -0400, D'Arcy J.M. Cain wrote:
> There is currently a discussion in the PostgreSQL list about how to get
> unix systems to read an SQL script and run it without choking on
> invalid statements such as "#! usr/whatever/bin/psql" at the top of the
> file. 

There are two typical approach for this and IMO both work well enough.
The first ione is to just teach the "interpreter" about the hash bang,
possibly under an option. That works well for things like psql. The
second option is to make it an actual shell script, which extracts the
content after a marker and calls the real tool.

Joerg


Home | Main Index | Thread Index | Old Index