Bash #10 - Combining commands (skip waiting)

Published: 23 February 2022
on channel: itvraag
247
7

In this video we'll cover three ways to combine and chain commands together in the Linux terminal using semi-colon, logical AND or logical OR operators. This will help you save a lot of time and automate checks.
#bash #bashscripting #terminal #linux
https://itvraag.nl

Timestamp:
0:00 Intro
0:17 operators to chain commands
1:16 semi-colon
1:38 when to use semi-colon
1:56 logical AND
2:52 logical OR
3:46 combine operators
4:05 grouping commands

Related video:
APT package manager:    • Bash #6 - Package manager APT (Debian...  
Windows 11 Terminal PRO tips:    • Maximize productivity in Windows 11 T...  
oh-my-zsh:    • Make your Linux CLI look like a PRO w...  
MacOS terminal PRO tips:    • Mac OS Terminal Tips with iTerm2  
Bash #4 - variables:    • Bash #4 - working with variables (wit...  
Bash #3 - script files:    • Bash #3 - Script files (with challenge)  
Bash #2 - help, touch, echo & aliases:    • Bash #2 - Help, touch, echo & aliases  
Bash #1 - basic concepts:    • Bash #1 - Basic concepts and requirem...  

Used commands:
clear;ls -alt;pwd;uname -srmp;whoami
chmod +x script1
mkdir dir1 && cd dir1
sudo apt update && sudo apt upgrade -y
[ -x "script3" ] || chmod +x script3
[ -x "script1" ] && echo done
[ -x "script1" ] || echo done
ls -lt; [ -x "script1" ] && echo true || echo false
VAR="1"; echo "VAR: $VAR"; { VAR="2"; echo "inside VAR: $VAR"; }; echo "outside VAR: $VAR"
VAR="1"; echo "VAR: $VAR"; ( VAR="2"; echo "inside VAR: $VAR"; ); echo "outside VAR: $VAR"
[ -x "script3" ] || ( echo first && echo second )


Watch video Bash #10 - Combining commands (skip waiting) online, duration hours minute second in high quality that is uploaded to the channel itvraag 23 February 2022. Share the link to the video on social media so that your subscribers and friends will also watch this video. This video clip has been viewed 247 times and liked it 7 visitors.