lundi 26 juillet 2021

Vaccination Program in shell programming [closed]

Vaccination Program in shell programming (LINUX):- if age>=18 then it will ask you are vaccinated if vaccinated then it will ask first dose or 2nd dose if first dose then it will tell go for 2nd dose if 2nd dose then it will print congrats. if age <=18 then print you are not eligible but wear mask.

I have made the following program but it is having some errors, please guide me to resolve this problem

#! /bin/bash
Echo “enter your age”
Read age
If [$age>=18]
Then
 Echo “you are vaccinated”
 Read vaccinated
 If [ $vaccinated=”yes”]
 Then
 Echo “How many dose”
 Read dose
 If [$dose=1]
 Then
 Echo “go for 2nd dose”
 Else
 Echo “congratulation”
 fi
 Else
 Echo “go for first dose”
 fi
 Else
 Echo” you are not eligible but wear mask.”
 fi 

Aucun commentaire:

Enregistrer un commentaire