Shell Scripts | Linux for Programmers #10

preview_player
Показать описание
In this continuation of our Linux for programmers series, we're going to be covering shell scripts within Linux. Shell scripts are a way to execute shell commands within a script. You can implement loops, if statements, conditions, statements that execute, and expressions that evaluate.

Chapters:
0:00 - Introduction & Overview
0:53 - Creating a Shell Script
3:26 - Executing Shell Scripts
5:01 - Functions
9:15 - Variables
10:47 - Exit Command
13:05 - If/Elif/Else
17:34 - User Input
19:12 - Outro

#Linode #AlternativeCloud #TechWithTim #Linux
Product: Linode, Linux, sysadmin; Tech With Tim;
Рекомендации по теме
Комментарии
Автор

I enjoyed the video. The only issue with all this quick tutorial is that maybe pointing out the reason why we write script can help people understand why they are so important. All it needs to be said is automation for instance at boot.

derekgoodwine
Автор

fun fact: the shebang is only needed in cases of uncertainty (like a file that should be shared) or when not using the same shell; any file run with './' will attempt to run in the same environment as where it was run (typically a shell).

RasmusFrederiksen
Автор

fun fact: adding '.sh' in making a shell script from the terminal is entirely optional. Even though your file doesn't end in '.sh', as long as your file has the shebang in it, give it 'chmod +x' permissions, and you can still run it with './'.

cindrmon
visit shbcf.ru