Should've made this a long time ago:
function ciglob {
#case-insensitive glob generator
echo "$*" |while read -N1 c; do
case "$c" in
[a-zA-Z]) echo -n "[${c^^}${c,,}]";;
*) echo -n "$c"
esac
done
}
~ $ ciglob "Hello, world!"
[Hh][Ee][Ll][Ll][Oo], [Ww][Oo][Rr][Ll][Dd]!
~ $ ls -ld $(ciglob documents)
drwxr-xr-x 52 ~~~ ~~~ 20,480 Apr 10 11:45 Documents
(Not the most useful example, but I did have a use case in mind when I wrote it ;)
P.S. (This is a valid way to close a parenthesis. Fight me ;)