Use case instead of awk expression

Thanks-to: @zerodeux