Skip to content

Commit 168e699

Browse files
author
Ankam Ravi Kumar
authored
Create variables
How to Write Variables and what are the best practices to write the variables in shell scripting.
1 parent 9f16bb7 commit 168e699

1 file changed

Lines changed: 27 additions & 0 deletions

File tree

variables

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/bin/bash
2+
#Purpose: What is variable.? How is help us in writing shell scripts
3+
#Version:1.0
4+
#Created Date: Sat May 5 20:25:21 IST 2018
5+
#Modified Date:
6+
#website: https://arkit.co.in
7+
#Author: Ankam Ravi Kumar
8+
# START #
9+
A=10
10+
Ba=23
11+
BA=45
12+
HOSTNAME=$(hostname)
13+
DATE=`date`
14+
1value=333
15+
False@Var=False
16+
Hyphen_a=WrongValue
17+
18+
echo "Variable A Value: $A"
19+
echo "Variable Ba Vaule: $Ba"
20+
echo "Variable BA Vaule: $BA"
21+
echo "Variable HOST value: $HOSTNAME"
22+
echo "Variable DATE value: $DATE"
23+
echo "Wrong Variable 1value $1value"
24+
echo 'False @ Variable' $False@Var
25+
echo "hyphen-a Variable Value: $Hyphen_a"
26+
27+
# END #

0 commit comments

Comments
 (0)