Bash #10 - Combining commands (skip waiting)

Опубликовано: 23 Февраль 2022
на канале: 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 )


Смотрите видео Bash #10 - Combining commands (skip waiting) онлайн, длительностью часов минут секунд в хорошем качестве, которое загружено на канал itvraag 23 Февраль 2022. Делитесь ссылкой на видео в социальных сетях, чтобы ваши подписчики и друзья так же посмотрели это видео. Данный видеоклип посмотрели 247 раз и оно понравилось 7 посетителям.