BASH scripting tutorial: Variable Expansion | Part 6

Опубликовано: 14 Январь 2025
на канале: azinke
30
4

shell, scripting, bash, linux, devops, terminal, automation, tutorial, cybersecurity, system administration

Intro

The Bourne Again Shell (BASH) is one of the available shells for use on Linux operating systems. Bash is quite popular and very practical for automating repetitive and daunting tasks, especially in the realm of software development and deployment.

Bash is present on most (if not all) Linux distributions and is highly useful for automating system administration tasks, DevOps-related tasks (like writing CI/CD pipelines), software development, etc.
Hence, as a software developer, Cloud Engineer, DevOps Engineer, System administrator, Cybersecurity Engineer, or just a Linux User, bash scripting is definitely a skill you would like to add to your toolbox.

On Windows, Git Bash offers a nice alternative to run bash scripts (although limited)

Content

The present video builds on the concepts introduced in previous parts to present variable expansion in Bash. The concept of variable expansion makes it possible to write more efficient or compact code with oneliner expressions. The variable expansion operators are presented in detail in the present video.

Note
If the tutorial happens to be too slow, feel free to speed it up to suit a comfortable pace for you.

Playlist
   • BASH Scripting Tutorial: From beginne...  

Useful Links:
https://www.gnu.org/software/bash/man...
https://www.mycompiler.io/
https://gitforwindows.org/

Timestamps
00:00 Intro
00:42 Using default value
04:18 Assign default value
06:56 Checking required value
10:25 Using alternative value
13:16 Getting substrings
16:40 Prefix-based variable name globbing
23:42 Getting strings or arrays length
26:01 Trimming pattern off variables
37:52 Find and replace
41:54 Case conversion