$ echo -en '123456789' | tr -t "123456789" "[:upper:]"
tr: misaligned [:upper:] and/or [:lower:] construct
[$? = 1]
$ echo -en '123456789' | cargo run tr -t "123456789" "[:upper:]"
00000000 41 42 43 44 45 46 47 48 49 |ABCDEFGHI|
00000009
$
Note that this really checks for alignment, not just presence:
$ echo -en '123abcABC' | tr -t "1[:lower:]" "[:upper:]_"
tr: misaligned [:upper:] and/or [:lower:] construct
[$? = 1]
$ echo -en '123abcABC' | cargo run tr -t "1[:lower:]" "[:upper:]_"
A23BCDABC
(Original issue: #6133)
Note that this really checks for alignment, not just presence:
(Original issue: #6133)