문제

What the title says. In bash, when I do:

$ echo [a-z]
b t

What does b t mean? Is there a special meaning for the [ ] operators in this context?

도움이 되었습니까?

해결책

The [a-z] is a pattern that will match any file(s) whose name consists of a single letter. In your case, the current directory has two files named b and t. If there are no matching files, the pattern is treated as literal text, which is why others will see [a-z] printed.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top