Today in this tutorial we will see how to write if else and nested if else in Bash Shell scripting.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | # Program in Bash Shell CHECK_SOURCE="[main] INFO com.dobe.jcr.checknode.existence.App - Node exists" echo $CHECK_SOURCE | grep -w -o -i 'Node exists' if [ $? == 0 ]; then echo " Node Exists" echo $CHECK_SOURCE | grep -w -o -i 'checknode' if [ $? == 0 ]; then echo "checknode exist" echo $CHECK_SOURCE | grep -w -o -i 'adobe' if [ $? == 0 ]; then echo "Adobe exist" else echo "Adobe doesnot Exist" fi else echo "checknode doesnot Exist" fi else echo "Node doesnot Exists" fi |
You may download the raw from Gist: https://gist.github.com/RashidJorvee/9e9de5c6f8fd2303d0438b492ee9ad33
Are you suffering from problems in your life? Do you think that your life is not running easily and is not going in the direction it should? If yes then it is the right time to contact the best astrologer Pandit Raj who offers well known astrological solutions for all kinds of issues irrespective of the level of complication. Contact the expert Indian astrologer in Melbourne now and say bye to all issues related to astrology and say welcome to a new life.
ReplyDeleteBest Astrologer in Melbourne
This post is so interactive and informative Blog!!
ReplyDeletekubernetes training hyderabad
kubernetes training in ameerpet
docker and kubernetes training
docker kubernetes training
kubernetes online training hyderabad
Wonderful Article,Thanks for sharing. We are providing the best services click on below links to visit our website.
GCP DevOps Online Training
GCP DevOps Training
GCP DevOps Training in Hyderabad
GCP DevOps Online Training Institute
GCP DevOps Training institute in Ameerpet
Google Cloud Platform Training Hyderabad
GCP DevOps Training in Ameerpet
DevOps On Google Cloud Platform Online Training
Really enjoyed this article. Many thanks again. Want more....
ReplyDeleteBest Data Science Online Certification Training India
SAP ABAP and HANA Online Training
SAP BODS Online Live Classes
Informatica IDQ Self paced Training Videos
App V Online Training from Hyderabad
AI & ML Online Training from India
SAP Plant Maintenance Training
Microsoft Active Directory Realtime Online Support In India
IBM DataPower Free Live Online Demo Class
SQL Performance Tuning Interview Questions & Answers