I created three files in my directory using the command touch inv{1..3}.txt
. Now I used two commands and their output is pretty much the same. Those two commands are ls inv[13].txt
and ls {1,3}.txt
.
So how are these two different? How are square brackets different compared to braces? Also I was googling for "linux [..]", but couldn't find anything, so could I know as to what these things are called in linux terminology?
Thanks
{}
and Filename Expansion > Pattern Matching for[]
.