Logo 
Search:

Unix / Linux / Ubuntu Answers

Ask Question   UnAnswered
Home » Forum » Unix / Linux / Ubuntu       RSS Feeds
  Question Asked By: Paulius K,....   on Aug 07 In Unix / Linux / Ubuntu Category.

  
Question Answered By: Kirtiranjan Sahoo   on Aug 07

#!/bin/bash

read -p "Enter a number between (1 to 12) :" mn
case $mn in
1)
echo "January"
;;
2)
echo "February"
;;
3)
echo "March"
;;
4)
echo "April"
;;
5)
echo "May"
;;
6)
echo "June"
;;
7)
echo "July"
;;
8)
echo "August"
;;
9)
echo "September"
;;
10)
echo "October"
;;
11)
echo "November"
;;
12)
echo "December"
;;
*)
echo "Plz enter a valid number"
;;
esac


Share: 

 
 
Didn't find what you were looking for? Find more on Unix shell-bash script Or get search suggestion and latest updates.


Tagged: