Conditional Statements in Linux - Part 1

preview_player
Показать описание
If statements (and, closely related, case statements) allow us to make decisions in our Bash scripts. They allow us to decide whether or not to run a piece of code based upon conditions that we may set. If statements, combined with loops (which we'll look at in the next section) allow us to make much more complex scripts which may solve larger tasks.

A basic if statement effectively says, if a particular test is true, then perform a given set of actions. If it is not true then don't perform those actions. It follows the format below:

if [ some test ]
then
commands
fi
#technology #learning #explore #learninvestandearn #learnwithme #nirajchopara #quicklearning #smartlearning #studytime #archlinux #linux #bashscripting #script #python #explore #programming #bashprogramming #devops #aws #azure #cloudcomputing #student #students #instagood #love #knowledge#educational #financialeducation #highereducation #educationmatters #earlychildhoodeducation
#study #learning #instagram #school #motivation
Рекомендации по теме