Last active
July 14, 2021 16:56
-
-
Save zthxxx/bdd6c5298133bc136b70fe42c65d294c to your computer and use it in GitHub Desktop.
hack for pass multiple arguments in shebang
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
':' // ; exec node --experimental-modules --experimental-specifier-resolution=node "$0" "$@" | |
// hack for pass multiple arguments in shebang | |
// The colon(:) is shell built-in command, which means do nothing, whatever its parameters are. | |
// https://stackoverflow.com/questions/48179714/how-can-an-es6-module-be-run-as-a-script-in-node | |
import xxx from 'xxx' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment