I wanted to list the content of a pwd and display only file starting with dot.
ls -a | grep ^\. but I cannot figure out why the output contains also the files which do not start with dot. For example:
Pictures .pip .pki .profile projects Public
I know that I can achieve what I want with
ls -ld .* I am just curious about this behaviour of grep which I can't explain.