Skip to content

Instantly share code, notes, and snippets.

@zthxxx
Last active July 14, 2021 16:56
Show Gist options
  • Save zthxxx/bdd6c5298133bc136b70fe42c65d294c to your computer and use it in GitHub Desktop.
Save zthxxx/bdd6c5298133bc136b70fe42c65d294c to your computer and use it in GitHub Desktop.
hack for pass multiple arguments in shebang
#!/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