تقييمات الطلاب
( 5 من 5 )
١ تقييمات
فيديو شرح Bash Scripting for Beginners: Complete Guide to Getting Started - If Statements (Part 5) ضمن كورس Bash Scripting شرح قناة Learn Linux TV، الفديو رقم 5 مجانى معتمد اونلاين
There are a lot of "Ifs" in life. "If" you'll get the job, "If" you win the lottery, "If" only you knew the answer to all things. But there's no "Ifs" about it, you'll learn all about If Statements in Bash with this video. We'll go through how to set up an if statement, why you'd want to write one in the first place, and some additional bash-related shenanigans!
Brand New Ansible Course Available
Check out the new course on Udemy! It covers everything you need to get started with Automation.
https://learnlinux.link/ansible
SUPPORT LINUX LEARNING!
• Grab some Linux swag https://merch.learnlinux.tv
• Become a Channel Member https://learnlinux.link/member
• Become a Patron https://learnlinux.link/patron
• 5% discount on LPI exam vouchers https://learnlinux.link/lpi-voucher
• Check out my latest book https://ubuntuserverbook.com
• Grab an awesome Pi-powered KVM https://learnlinux.link/tinypilot
• Jay's Gear - Server, Computer and Video Production Stuff https://learnlinux.link/amazon
_Note: Royalties and/or commission is earned from each of the above links_
Individual Sections
00:00 - Pre-Intro
00:48 - Intro
01:13 - Understanding "If Statements" in Bash and why they're useful
01:42 - An example of an If Statement within a Bash Script on Linux
04:43 - Marking the script executable and running it
07:19 - Creating an If/Else conditional in Bash
12:07 - Using an If Statement in a Bash Script to check for the existence of a file
14:22 - Further explanation of checking for the existence of files and directories on Linux
15:20 - Using the which command on Linux to check if a command is present
16:19 - Creating a Bash Script to install a package if it's not already installed
21:52 - How to use the apt command inside a Bash Script on Linux
23:02 - Using the -y option with apt to assume yes (bypass/skip prompts)
OTHER BASH SCRIPTING SERIES EPISODES
- Class 01 Introduction: https://linux.video/bash1
- Class 02 Hello World: https://linux.video/bash2
- Class 03 Variables: https://linux.video/bash3
- Class 04 Math Functions: https://linux.video/bash4
- Class 05 If Statements: https://linux.video/bash5
- Class 06 Exit Codes: https://linux.video/bash6
- Class 07 While Loops: https://linux.video/bash7
- Class 08 Universal Update Script: https://linux.video/bash8
- Class 09 For Loops: https://linux.video/bash9
- Class 10 Where To Store Your Scripts: https://linux.video/bash10
- Class 11 Data Streams: https://linux.video/bash11
- Class 12 Functions: https://linux.video/bash12
- Class 13 Case Statements: https://linux.video/bash13
- Class 14 Scheduling Jobs (Part 1): https://linux.video/bash14
- Class 15 Scheduling Jobs (Part 2): https://linux.video/bash15
- Class 16 Arguments: https://linux.video/bash16
- Class 17 Building a Backup Script: https://linux.video/bash17
- Class 18 Closing: https://linux.video/bash18
LEARN LINUX TV ON THE WEB
• Main site https://www.learnlinux.tv
• Community https://community.learnlinux.tv
• Official Github Account https://github.com/LearnLinuxTV
• Enterprise Linux Security Podcast https://enterpriselinuxsecurity.show
• The Homelab Show Podcast https://thehomelab.show
• Jay on Udemy https://www.udemy.com/user/jay-lacroix-3
• Jay on Twitter https://x.com/JayTheLinuxGuy
• Content Ethics https://www.learnlinux.tv/content-ethics
• Request Assistance https://www.learnlinux.tv/request-assistance
Learn Linux TV provides technical content that will hopefully be helpful to you and teach you something new. However, this content is provided without any warranty (expressed or implied). Learn Linux TV is not responsible for any damages that may arise from any use of this content. The person viewing Learn Linux TV's content is expected to follow their best judgement and to make their best decisions while working with any related technology. Always make sure you have written permission before working with any infrastructure. Also, be sure that you're compliant with all company rules, change control procedures, and local laws.
#commandline #linuxtutorial #bash