Overview

Class Practical for Linux Basic Scripting

Hello {Name}

#!/bin/bash 
echo "Hello, $1" 

Output

bash hello.sh Mentor 
Hello Mentor 

Age Check

#!/bin/bash

#user-input
echo -n "Enter Your Age: "
read VAR 

#function
if [[ $VAR -gt 21 ]]
then
	echo "You're Adult"
else
	echo "Nope!"
fi

OutPut

bash age.sh 19 
Nope!