Scripts
Scripts: A Script Is an Application, Your First Script, Run It from Anywhere: ~/bin on Your PATH.
Updated
- A Script Is an Application (Novice): Every application takes something in, does some work and gives something back, and a bash script does the same from a text file of commands you can read, which makes it a quick-run application of your own, best at jobs made of files, folders and other programs.
- Your First Script (Apprentice): A script is a file of commands that starts with the shebang line #!/usr/bin/env bash and explains itself in comments; chmod +x lets it run, and ./ and its name runs it from the folder it's in.
- Run It from Anywhere: ~/bin on Your PATH (Apprentice): Copy a finished script into ~/bin without its .sh, put ~/bin on your PATH, and it runs by name from any folder like any other command, as long as the paths inside it work from anywhere and its name isn't already taken, which type checks.