Logo 
Search:

Unix / Linux / Ubuntu Forum

Ask Question   UnAnswered
Home » Forum » Unix / Linux / Ubuntu       RSS Feeds

Unix shell-bash script

  Asked By: Paulius    Date: May 02    Category: Unix / Linux / Ubuntu    Views: 2366
  

Hello,
Need really big help from u guys. I got a task to write a script:

Write a script in which the argument is the month number and month name is displayed.

And i'm so unexperienced that i just dont know where to start, plz help, any tip/info/source that could help me..I will be gratefull for any usefull tip.

Share: 

 

1 Answer Found

 
Answer #1    Answered By: Kirtiranjan Sahoo     Answered 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


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




Tagged: