Skip to content

Commit 6d94a90

Browse files
authored
Create example5_if_condition.sh
1 parent f184167 commit 6d94a90

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

example5_if_condition.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/bin/bash
2+
3+
#This script is created to demostrate the if condition handling
4+
username=$(whoami)
5+
6+
echo "${username}"
7+
8+
if [[ "${username}" == "rootk" ]];
9+
then
10+
echo "you are root user"
11+
else
12+
echo "you are not root user"
13+
fi

0 commit comments

Comments
 (0)