-rw-r--r-- 1 root root 0 Jul 11 12:12 1.txt
-rw-r--r-- 1 root root 0 Aug 12 11:37 2.txt
-rw-r--r-- 1 root root 0 Aug 12 11:37 3.txt
-rw-r--r-- 1 root root 0 Aug 12 11:38 4.txt
-rw-r--r-- 1 root root 0 Aug 12 11:38 5.txt
-rw-r--r-- 1 root root 0 Aug 12 11:38 6.html
I want to delete *.txt and not create Aug.
# ls -al | egrep -v Aug | egrep .txt
-rw-r--r-- 1 root root 0 Jul 11 12:12 1.txt
But How do I delete use "rm" command?
P.S I know this know-how
# ls -al | egrep -v Aug | egrep .txt | awk '{ print $8}' > aaa.txt
and included rm -f in aaa.txt