March 28th, 2013, 06:03 PM
List files ending with continuous #
I need to list all files ending with # as 32,33,34,...,51,52. Remember use:
ls -1 *[32-52]
But it's not what I need. Thanks in advance.
March 29th, 2013, 10:02 AM
So, what do you need as the result?
This smells of homework
The moon on the one hand, the dawn on the other:
The moon is my sister, the dawn is my brother.
The moon on my left and the dawn on my right.
My brother, good morning: my sister, good night.
-- Hilaire Belloc
March 31st, 2013, 05:15 PM
haha, it's not homework.
I have a bunch of files ending w/ #. So I only need to list the following as: 32.txt, 33.txt, 34.txt, 35.txt, ... 52.txt.
Originally Posted by SimonJM
April 1st, 2013, 12:07 PM
ls -1 | grep -P "\d.txt$"
HEY! YOU! Read the New User Guide and Forum Rules
"They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." -Benjamin Franklin
"The greatest tragedy of this changing society is that people who never knew what it was like before will simply assume that this is the way things are supposed to be." -2600 Magazine, Fall 2002
Think we're being rude? Maybe you asked a bad question
or you're a Help Vampire.
Trying to argue intelligently? Please read this.