Shell Script

입력값 검증 (Y y yes)

1. 개요

입력값 검증 – Y, y, yes, Yes, YEs…

 

2. command

if [ `echo $answer | grep "^[Yy]$\|^[Yy][Ee][Ss]$"` ]; then
    echo yes
fi

 

Back To Top