A question about "echo "$CALLER" | tr -s '[:upper:]' '[:lower:]'"
Hi all,
Als I run following command: Code:
echo "EA" | tr -s '[:upper:]' '[:lower:]' Code:
echo "AA" | tr -s '[:upper:]' '[:lower:]' How can I get the aa as return? |
From "man tr":
Quote:
|
Don't use "-s" - it tells it to get rid of repeats so it doesn't show the second "a". (You'd have same issue with EE, FF, ZZ etc... using "-s".
Code:
echo "AA" |tr '[:upper:]' '[:lower:]' |
EDIT: What they said, I posted late.
|
Quote:
|
BTW, bash v4+ has case conversion parameter substitutions built-in.
Code:
string="ABCDE" |
All times are GMT -5. The time now is 02:53 AM. |