Compare Strings (Case Insensitive)

Compare two strings ignoring case differences.

Code

General
[ "${str1,,}" = "${str2,,}" ] && echo "true" || echo "false"

Parameters

First string to compare

Second string to compare

Server

More Bash Snippets