Skip to content

Instantly share code, notes, and snippets.

@vdbsh
Last active May 11, 2024 16:56
Show Gist options
  • Save vdbsh/5567e583121f135036900a32175779a9 to your computer and use it in GitHub Desktop.
Save vdbsh/5567e583121f135036900a32175779a9 to your computer and use it in GitHub Desktop.
This is how you can set architecture of your shellscript runtime by using unconventional shebang, comes in handy for M1+ Macs where you can use both arm64 and x86_64 thru Rosetta 2
#!/usr/bin/env /usr/bin/arch -arm64 /bin/bash
# shebangarch.sh: This is how you can set architecture of your shellscript runtime by using unconventional shebang
# comes in handy for M1+ Macs where you can use both arm64 and x86_64 thru Rosetta 2
echo "I'm $(arch) 😊"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment