BASH scripting tutorial: Directory stack & Tilde expansion | Part 5

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

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 current part covers the directory stack manipulation and tilde expansion in Bash. The directory stack in Bash offers the possibility to temporarily switch to the context of another directory to perform some actions and unwind when done. For that purpose, pushd and popd allow the manipulation of the directory stack while the dirs command shows the current stack.
Tilde expansion provides some shortcuts to reference paths from the directory stack or user home directory.

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/


Music Licenses

Puppy Love (Sting) by Twin Musicom is licensed under a Creative Commons Attribution 4.0 license. https://creativecommons.org/licenses/...
Artist: http://www.twinmusicom.org/