正则表达式取文件后缀
[04:26:10 root@C8-3-55 ~]#ls
- dlt.sh passwd.bak
1 elsfk.sh passwd.bak1
123456.tct EOF passwd.bak1.orig
123456.txt f1.txt passwd.txt
123.txt f2.sh passWord.txt
1.txt f2.txt pwd.patch
2.txt f3.sh PWD.txt
奈曼.txt fdisk.info reDir.sh
anaconda-ks.cfg F.sh rm.sh
arg.sh game.sh rpmbuild
backup_V1.0.sh hellow.color screen-4.6.2-10.el8.src.rpm
bacupEtc.sh IP.log screen-4.6.2-10.el8.x86_64.rpm
cheak_IP.sh M41 sysinfo.sh
cr_v1.0.sh name.txt userAdd100.sh
cup.info null username.txt
'date +%F.log' pas0 vimrc
df.info passwd yn_1.1.sh
disk_warning.sh passwd.ba yn.sh
[04:26:35 root@C8-3-55 ~]#ls | grep -Eo '[^.]+$'
-
1
tct
txt
txt
txt
txt
txt
cfg
sh
sh
sh
sh
sh
info
log
info
sh
sh
sh
EOF
txt
sh
txt
sh
info
sh
sh
color
log
M41
txt
null
pas0
passwd
ba
bak
bak1
orig
txt
txt
patch
txt
sh
sh
rpmbuild
rpm
rpm
sh
sh
txt
vimrc
sh
sh
* * *
胖并快乐着的死肥宅
* * *