Shell glob element [:space:] not working as expected
Hello :)
The following terminal transcript shows [:space:] not matching a space character as expected. Why not? Code:
c@CW8:~$ touch 'a b' Charles |
I have always used it with double square brackets, that is a range of characters, where the characters are those given by [:space:]. It works for me:
Code:
$ touch 'a b' |
Hello colucix
Quote:
So where the GNU bash reference says Within ‘[’ and ‘]’, character classes can be specified using the syntax [:class:], where class is one of the following classes defined in the posix standard: alnum, alpha, ascii, blank ... it means [:blank:] within [] giving [[:blank:]. Good to know. Best Charles |
All times are GMT -5. The time now is 12:29 AM. |