Skip to content

Commit 90f9658

Browse files
committed
added new basic file
1 parent a042f49 commit 90f9658

2 files changed

Lines changed: 32 additions & 0 deletions

File tree

basic_of_scripting.sh

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/bin/bash
2+
3+
# There are two type of comments
4+
5+
<< comments
6+
This is multi
7+
level
8+
comment
9+
comments
10+
11+
# This is a variable declaration
12+
name="Sanjay Rai"
13+
14+
echo "Name is $name, date is $(date)"
15+
16+
# Take input from user
17+
18+
echo "Enter your name:"
19+
20+
read username
21+
22+
echo "Username is : $username"
23+

basic_of_scripting1.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/bash
2+
3+
read -p "Enter your username:" username
4+
5+
echo "Username is: $username"
6+
7+
sudo useradd -m $username
8+
9+
echo "New user added"

0 commit comments

Comments
 (0)