When I do ls -l | grep ^d it lists only directories in the current directory.
What I'd like to know is what does the caret ^ in ^d mean?
|
When I do What I'd like to know is what does the caret |
||||
|
|
Andy's answer is correct, as seen in the man page:
The reason it works is the |
|||
|
|
|
That's a caret, not a carrot. It means "beginning of the line." The grep is matching only lines that start with "d". |
||||
|
|