someone can explain me why this regexp doesn't work in grep?
ls -la ./ | grep -E '^d.*\<\..*\>$'
In my (wrong) opinion this have to show me the line of the directory with a name that start with ".", because:
- ^d -> keep lines that start with character "d"
- .* -> none or any combination of characters
- $ -> end of the line
The problem is that I don't understand this:
- \< -> start of the word
- . -> escape the point
- .* -> none or any combination of characters
- > -> end of the word
So I thought that this part of regexp keeps the lines that contain words that start with point and end with a combination of characters.
With this "ls -la" that regexp with grep shows none of result:
[arch dirtest]$ ls -la
total 52
drwxr-xr-x 6 siv users 4096 10 nov 00.41 .
drwx------ 59 siv users 4096 9 nov 23.15 ..
drwxr-xr-x 2 siv users 4096 10 nov 00.41 .test
drwxr-xr-x 2 siv users 4096 10 nov 00.41 test1
drwxr-xr-x 2 siv users 4096 10 nov 00.41 test2