0

if I asking for a username I have this in the file

read -p 'enter username: ' username

what can I add to make sure it comes out lowercased?

0

1 Answer 1

1

You can do

username="${username,,}"

to convert every character to lower case.

See https://www.gnu.org/software/bash/manual/bashref.html#Shell-Parameter-Expansion.

Not the answer you're looking for? Browse other questions tagged or ask your own question.