Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.user > #264617
| From | Albretch Mueller <lbrtchx@gmail.com> |
|---|---|
| Newsgroups | linux.debian.user |
| Subject | Re: why would "tr --complement --squeeze-repeats ..." append the substitution char once more? ... |
| Date | 2023-12-11 15:10 +0100 |
| Message-ID | <HJP8R-cQVR-3@gated-at.bofh.it> (permalink) |
| References | (2 earlier) <HJJwt-cNcV-5@gated-at.bofh.it> <HJJZw-cNr8-17@gated-at.bofh.it> <HJNTr-cQ17-7@gated-at.bofh.it> <HJOmt-cQqs-1@gated-at.bofh.it> <HJOwa-cQtH-11@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Ach, yes! I forgot echo by default appends a new line character at
the end of every string it spits out. In order to suppress it you need
to use the "n" option: "echo -n ..."
_FL_TYPE=" abc á é í ó ú ü ñ Á É Í Ó Ú Ü Ñ 123 birdie🐦here ¿ ¡ §
ASCII ä ö ü ß Ä Ö Ü Text "
echo "// __ \$_FL_TYPE: |${_FL_TYPE}|"
_FL_TYPE=$(echo "${_FL_TYPE}" | xargs)
echo "// __ \$_FL_TYPE: |${_FL_TYPE}|"
_FL_TYPE=$(echo -n "${_FL_TYPE}" | tr --complement --squeeze-repeats
'[A-Za-z0-9.]' '_');
echo "// __ \$_FL_TYPE: |${_FL_TYPE}|"
// __ $_FL_TYPE: | abc á é í ó ú ü ñ Á É Í Ó Ú Ü Ñ 123 birdie🐦here
¿ ¡ § ASCII ä ö ü ß Ä Ö Ü Text |
// __ $_FL_TYPE: |abc á é í ó ú ü ñ Á É Í Ó Ú Ü Ñ 123 birdie🐦here ¿ ¡
§ ASCII ä ö ü ß Ä Ö Ü Text|
// __ $_FL_TYPE: |abc_123_birdie_here_ASCII_Text|
Thank you,
lbrtchx
Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
why would "tr --complement --squeeze-repeats ..." append the substitution char once more? ... Albretch Mueller <lbrtchx@gmail.com> - 2023-12-11 04:00 +0100
Re: why would "tr --complement --squeeze-repeats ..." append the substitution char once more? ... Greg Wooledge <greg@wooledge.org> - 2023-12-11 04:40 +0100
Re: why would "tr --complement --squeeze-repeats ..." append the substitution char once more? ... Albretch Mueller <lbrtchx@gmail.com> - 2023-12-11 09:10 +0100
Re: why would "tr --complement --squeeze-repeats ..." append the substitution char once more? ... <tomas@tuxteam.de> - 2023-12-11 09:40 +0100
Re: why would "tr --complement --squeeze-repeats ..." append the substitution char once more? ... Albretch Mueller <lbrtchx@gmail.com> - 2023-12-11 12:30 +0100
Re: why would "tr --complement --squeeze-repeats ..." append the substitution char once more? ... tomas@tuxteam.de - 2023-12-11 13:00 +0100
Re: why would "tr --complement --squeeze-repeats ..." append the substitution char once more? ... Greg Wooledge <greg@wooledge.org> - 2023-12-11 13:40 +0100
Re: why would "tr --complement --squeeze-repeats ..." append the substitution char once more? ... Greg Wooledge <greg@wooledge.org> - 2023-12-11 13:50 +0100
Re: why would "tr --complement --squeeze-repeats ..." append the substitution char once more? ... <tomas@tuxteam.de> - 2023-12-11 14:20 +0100
Re: why would "tr --complement --squeeze-repeats ..." append the substitution char once more? ... Greg Wooledge <greg@wooledge.org> - 2023-12-11 14:30 +0100
Re: why would "tr --complement --squeeze-repeats ..." append the substitution char once more? ... Albretch Mueller <lbrtchx@gmail.com> - 2023-12-11 15:10 +0100
Re: why would "tr --complement --squeeze-repeats ..." append the substitution char once more? ... Max Nikulin <manikulin@gmail.com> - 2023-12-11 16:00 +0100
Re: why would "tr --complement --squeeze-repeats ..." append the substitution char once more? ... Greg Wooledge <greg@wooledge.org> - 2023-12-11 16:00 +0100
Re: why would "tr --complement --squeeze-repeats ..." append the substitution char once more? ... <tomas@tuxteam.de> - 2023-12-11 16:10 +0100
"echo" literally in sh scripts (was: why would "tr --complement --squeeze-repeats ..." append the substitution char once more? ...) Stefan Monnier <monnier@iro.umontreal.ca> - 2023-12-11 16:20 +0100
Re: "echo" literally in sh scripts (was: why would "tr --complement --squeeze-repeats ..." append the substitution char once more? ...) Greg Wooledge <greg@wooledge.org> - 2023-12-11 18:00 +0100
Re: why would "tr --complement --squeeze-repeats ..." append the substitution char once more? ... Albretch Mueller <lbrtchx@gmail.com> - 2023-12-11 20:00 +0100
Re: why would "tr --complement --squeeze-repeats ..." append the substitution char once more? ... debian-user@howorth.org.uk - 2023-12-11 19:20 +0100
csiph-web