Description
In this course, you will :
- Learn how to write shell scripts to save time and effort.
- Explore the script header, or shebang, and the location of scripts.
- Learn more advanced syntax by conditionally processing commands with logic and loops.
- Learn how to use and create functions in your scripts, which will allow you to create more effective and readable solutions.
- You'll be able to automate the creation of user accounts using Linux bash scripting and repurpose the script for your own needs.
Syllabus :
1. Automating Tasks Using Bash Scripts
- What Are Shell Scripts?
- Using Script Syntax at the CLI
- Understanding Script Logic
- Using Simple Logic at the CLI
2. Creating Your Own Shell Scripts
- What Is a Shebang and Why Do I Want to Know?
- Implementing the Shebang5mWorking with vim Abbreviations
- Working with PATH and Execute Permissions
- Special Variables
- Using Special Variables in Scripts
3. Automating the User Creation Process
- Testing User Input
- Ensure User Is Not Already Present
- Using Read During Script Execution
- Creating User Accounts
4. Using Functions and Loops in Scripts
- Creating Better Scripts
- Comparing All Arguments
- Using while Loops
- Implementing Functions within Scripts