Files
linux.softwareshinobi.com/landing/docs/Bash-Scripts/002-bash-structure.md
Software Shinobi 7d9171c854
All checks were successful
learn org at code.softwareshinobi.com/linux.softwareshinobi.com/pipeline/head This commit looks good
reworking content
2025-06-19 10:03:08 -04:00

664 B

Bash Basics

To begin, create a new file with a .sh extension. We'll use shinobi.sh as our example.

You can create it instantly with touch:

touch shinobi.sh

Or, open it directly in your text editor:

nano shinobi.sh

For your script to execute, the very first line must specify the interpreter. This is called the Shebang. While #!/bin/bash instructs the operating system to use /bin/bash, its location can vary. For wider compatibility, use this:

#!/usr/bin/env bash

This tells the system to find bash within your PATH environment variable, ensuring your script runs consistently across different systems.