I am making a script in unix that will read a text file and each record has six fields separated by a pipe. I don't know if I should use a case statement or an if/else statement.
- If the
$JOB
has a value ofP
thenNEW_NICE
should be set to3
. - If the
$JOB
has a value ofS
thenNEW_NICE
should be set to6
. - All other values of
$JOB
should setNEW_NICE
to7
.
I kinda wanna use a case statement because it would be simpler, but I also am not sure on how that would look.
Aucun commentaire:
Enregistrer un commentaire