Script Build

I have a 3 status option 1 , 4 , 6
1 - Active
4 - Temp..
6 - Deactive
I want to build a script which when it finds either of the status options (1,4,6), then returns the relevant string.

txs

:confused:

Hi,

Try the following script.

#!/bin/ksh
PS3="Select the option number: "
select option in 1 4 6 0
do
case "$option" in
1) echo "Active";;
4) echo "Temp";;
6) echo "Deactive";;
0) exit 0;;
*) echo "Invalid selection";;
esac
done

awk '{\
        if     ($1 == "1") print "Active";\
        else if($1 == "4") print "Temp";\
        else if($1 == "6") print "Deactive";\
        else print "Invalid";\
}'

Are you actually wanting the 1,4, or 6 to be provided interactively by the user? Or is this some sort of logic you need to check files for?