Reputation: 31
I am a beginner that is working with Unix. One of my homework question is what does using pathname/ grep fl*o do?
I assumed it would match preceding any lines in the directory/file with anything that starts with "f" or "l" or that ends with "o" but when i run the input I am wrong. Any help would be appreciated
Upvotes: 0
Views: 58
Reputation: 195199
You should google some regular expression tutorial and start understanding the basic of regex. Grep works with regex.
so fl*o
is a regex, it matches:
fo
flo
fllo
fllllllllllllllllo
so f
then zero or many l(s)
then o
Upvotes: 1