linux - What does shell command ls [abc]*e*? search for? -
what files linux shell command
ls [abc]*e*?
going for?
first, aware that, while many other commands use regular expressions, ls
uses globs. let's break down glob [abc]*e*?
matches:
[abc]
matches 1 character chosen set a, b ,or c.*
matches number of charactere
matchese
.*
matches number of character.?
matches 1 character.
for example, consider directory these files:
$ ls a1w2e3z41 ae1 af1 de1
the matches among these glob are:
$ ls [abc]*e*? a1w2e3z41 ae1
Comments
Post a Comment