Multiline shebang: Difference between revisions

Content added Content deleted
(Added FreeBASIC)
(correct jq section)
 
Line 350: Line 350:
Here is an example using bash:
Here is an example using bash:
<pre>
<pre>
#!/bin/bash
#!/bin/sh
# this line is ignored by jq provided it ends with a backslash \
# the following line is ignored by jq provided this one ends with a backslash \
exec jq -nef "$0" "$@"
exec jq -nef "$0" "$@"
# jq code follows
# jq code follows
Line 360: Line 360:


Arguments can be passed in to the script, e.g. using the --arg NAME VALUE option.
Arguments can be passed in to the script, e.g. using the --arg NAME VALUE option.

The above script will also work with `sh` provided the quotation marks around `$@` are removed.


=={{header|Julia}}==
=={{header|Julia}}==