Regex help
This is just a simple script which echoes to the screen whatever the user types and quits when the user types quit or QUIT.
Code:
while read LINE; do |
Try
Code:
if [[ $(echo $LINE | tr [:lower:] [:upper:]) = "QUIT" ]]; then |
Hi.
You can also use Code:
shopt -s nocasematch man bash: Quote:
|
Or if bash is version 4 or greater:
Code:
[[ ${LINE^^} == QUIT ]] && break |
All times are GMT -5. The time now is 04:10 PM. |