tag 9719 notabug
thanks
On 10/10/2011 10:55 AM, Ovear wrote:
address@hidden ~]# echo " aa bb cc
dd ee "| tr -s [:blank:]
a bb cc dd ee
Thanks for the report. However, this is not a bug in tr, but a bug in
your usage of the shell. I suspect that you have a file in the current
directory that is named with a single character, such that the shell
glob [:blank:] is expanding to the name of that file.
address@hidden ~]# echo " aa bb cc
dd ee "| tr -s " "
aa bb cc dd ee
address@hidden ~]#
i can not use like "[:blank:]"
Yes you can, if you quote it so the shell can't treat it as a glob:
# echo " aa bb cc
> dd ee "| tr -s "[:blank:]"
aa bb cc dd ee
--
Eric Blake address@hidden +1-801-349-2682
Libvirt virtualization library http://libvirt.org