LS is the default sort.
So:
LS only supports wildcard characters and does not support regular, so simply using LS is not possible.
Some regular filtering operations require a combination of regular-support commands such as grep, sed, or awk.
Example: LS | grep "[0-9]$"
Gets: Aaa1 Aaa2 Aaa3
Share
This answer by computer network classification talent Wang ZHENGMAO certification other similar issues
- 2010-04-29linux under ls command
- 2012-09-23linux "ls", "ls-a", "Ls-al" of the District ... -
- 2010-03-26linux ls-l
- 2009-04-23linux Regular Expressions
- 2014-09-17linux Regular Expressions
More aboutproblems with the Linux shell LS regular expression >>Recommended for you:2014-10-21 22:40 netizens adopted
Bash has only extended, not regular operations.
Excerpt a little, you see
A peculiar use
Replace the file name on the spot
MV Xxx{yyy,www}zzz.tt
Extended
In fact, an array-like extension.
Echo/etc/init/avahi-{daemon,lol,what}.conf
/etc/init/avahi-daemon.conf/etc/init/avahi-lol.conf/etc/init/avahi-what.conf
For i in a{2,{1..3},5}; do echo $i; Done
A2
A1
A2
A3
A5
Linux LS Regular expression