Toptube Video Search Engine



Title:Bash Scripting on Linux (The Complete Guide) Class 05 - If Statements
Duration:31:43
Viewed:106,045
Published:28-11-2022
Source:Youtube

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 *Check out the Linux Shop* In the official shop, you'll find Shirts, hats, stickers, bags and more! ➜ https://merch.learnlinux.tv *5% discount on LPI exam vouchers* After you finish Jay's new course, get 5% off an LPI exam voucher here: ➜ https://learnlinux.link/lpi-voucher *Become a Patron* Show your support for Learn Linux TV on Patreon and get access to exclusive perks! ➜ https://learnlinux.link/patron *Become a Channel Member* Show your support for Learn Linux TV here on YouTube and get access to exclusive perks! ➜ https://learnlinux.link/member *Mastering Ubuntu Server: 4th Edition* Jay's latest book covers everything you need to know in order to master Ubuntu Server. It's available here: ➜ https://ubuntuserverbook.com *Linux Gear and Kits* Check out Jay's choice of hardware products, audio/video equipment, and more. ➜ https://learnlinux.link/amazon *Grab an awesome Pi-powered KVM* Support Learn Linux TV and grab yourself a TinyPilot KVM here: ➜ https://learnlinux.link/tinypilot _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 SOMETHING NEW - How to create a bootable flash drive for installing Linux ➜ https://linux.video/flash-usb - Understanding Linux permissions ➜ https://linux.video/perms - OpenSSH Guide ➜ https://linux.video/ssh - LVM Deep-dive ➜ https://linux.video/lvm - How to better secure OpenSSH ➜ https://linux.video/secure-ssh *Official *Learn Linux TV on the Web** • Main site ➜ https://www.learnlinux.tv • Community ➜ https://community.learnlinux.tv 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



SHARE TO YOUR FRIENDS


Download Server 1


DOWNLOAD MP4

Download Server 2


DOWNLOAD MP4

Alternative Download :