Today we will start work with variables in bash. If you already are a programmer or a developer, then you know about variables. It's a medium to store values in computer memory in order to use it later in the program.
Check out previous bash tutorials:
- Bash commands for beginners
- Bash commands chaining, redirecting and nesting
- Bash shell file walk-through
- Bash scripting: passing arguments & user input
Bash variables are dynamically typed. We already used them before. However, in this tutorial we will deep dive into how to assign a variable, how to call it, assign a variable from a command directly.
Also, you will learn about string manipulation in bash which could get a bit tricky since we are using special characters to perform such manipulation instead of built-in functions in other languages.