Sunday 17 January 2016

Bash shell scripting different variables

#!/bin/bash

#understanding different system and user varibles

echo "whoami $USER"

#global variables
# use ` for getting output of shell commands within echo output

#echo -e "Global Current Shell Values Are:\n `printenv`"

#user defined variables

i=10
j=20.5
k=30.254

echo "$i $j $k"

#strings

name="jataayu"
name1='jataayu'

echo $name $name1

echo '$name'

#constant

readonly n=100

echo $n

No comments:

Post a Comment