METHOD 1:
#! /bin/bash
#pass the message in echo function with variables randomly by using READ
echo "what is your name:"
read name
echo "what is your job:"
read job
sleep 2
echo "my name is $name"
sleep 2
echo "$name doing the the $job"
[prabhucloudxlab@cxln4 ~]$ ./echo3.sh
what is your name:
sunny
what is your job:
HADOOP
my name is sunny
sunny doing the the HADOOP
NOte:
Read name means ----->. get user input
$name -------------------->> store input inside the variable
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
METHOD 2:
[prabhucloudxlab@cxln4 ~]$ cat>echo4.sh
#! /bin/bash
#pass the message in echo function with variables randomly by using $
name=$1
job=$2
sleep 2
echo "my name is $name"
sleep 2
echo "$name doing the the $job"
[prabhucloudxlab@cxln4 ~]$ chmod 777 echo4.sh
[prabhucloudxlab@cxln4 ~]$ ./echo4.sh SANDEEPPRABHU QA_Engineer
my name is SANDEEPPRABHU
SANDEEPPRABHU doing the the QA_Engineer
Note:
$1 ->> 1st position of argument or parameter ( SANDEEPPRABHU )
$2 ->> 2nd position of argument or parameter ( QA_Engineer)