LabReport-2_A2_0242220005101251
LabReport-2_A2_0242220005101251
Submitted To
Name : Nushrat Jahan Oyshi
Designation : Lecturer Computer Science & Engineering
Daffodil International University
Submitted By
Name : Kazi Tawhid Ibn Monir
Id : 0242220005101251
Section : 63_A - (A2)
Daffodil International University
DIU 2/5/2025
1. Objective
Demonstrate advanced user input and conditional statement techniques in Bash shell scripting
Key Points:
Key Points:
#!/bin/bash
DIU 2/5/2025
echo -e "\nUsername: $username"
Key Points:
3. Conditional Statements
Example: Number Comparison-
#!/bin/bash
count=15
if (( count > 10 ))
then
fi
if [ $count -gt 10 ]
then
fi
Key Points:
DIU 2/5/2025
Example: Age-based Classification-
#!/bin/bash
if [ $age -lt 18 ]
then
echo "Minor"
then
echo "Adult"
else
fi
Key Points:
#!/bin/bash
echo -e "\n"
if [ ${#password} -ge 8 ]
then
DIU 2/5/2025
else
Fi
Key Points:
DIU 2/5/2025