7. How to use If elif else then else then fi in shell

How to use If elif else then else then fi in shell

#! /bin/bash

read word
if [[ $word == “b” ]]
then
echo ” condition true”
elif [[ $word == “a” ]]
then
echo ” condition false”
else
echo ” unknown condition”
fi

Leave a Reply

Your email address will not be published. Required fields are marked *

Recent Posts

Copyright © 2014-2018 Thearticlenow | All Rights Reserved.