Monday, 10 February 2020

Read command in linux

Good Reference:
https://www.youtube.com/watch?v=QW-stV8aW_U

To pass SID details in to scripts:

#!/bin/bash
echo "enter the SID :"
read SID
echo "the SID you enter is $SID"


OUTPUT:
Hostname:/install/ ./test1.sh
enter the SID :
RAM
the SID you enter is RAM

Method 2 of passing dynamic parameter in to scripts

 cat test2.sh
#!/bin/bash
read -p "enter your SID: " SID
echo " conform your SID as $SID"

No comments:

Post a Comment