Skip to content

Quick start guide for bash

Mahdi Qiamast edited this page Feb 8, 2023 · 1 revision

📚 Basic Concepts

Concept Description
Command A instruction that the shell executes
Argument Information passed to a command to modify its behavior
Option A flag used to modify the behavior of a command

💻 Running Scripts

  1. Create a new file with .sh extension
  2. Add commands to the file
  3. Make the file executable with chmod +x <file>
  4. Run the file with ./<file>

💡 Tips

  • Use # to add comments to your script
  • Use options like -l or --long to modify the behavior of commands
  • Use command substitution with $(command) to include the output of a command in another command
  • Use environment variables like $HOME to access information about the system.