Help with ls and grep/egrep
I have following files in a directory
Pro.log Pro.log1 Pro.log14 Pro.log55 Pro.log.2008-05-18 Pro.log10 Pro.log2 Pro.log6 Pro.log.2008-05-19 Pro.log11 Pro.log3 Pro.log7 Pro.log.2008-05-20 Pro.log12 Pro.log4 Pro.log8 Pro.log.2008-05-21 Pro.log13 Pro.log5 Pro.log9 I want to find only the files which are without date format and in the range of 5-9 ; output should be as Pro.log5 Pro.log6 Pro.log7 Pro.log8 Pro.log9 I Tried various combinations and the closest I could reach was with ls | egrep [Pro.log] | egrep [5-9] |egrep -v [-^] but its also showing Pro.log55 in output. Please help!! Thanks |
What about this?
Code:
ls -1 Pro.log? |
All times are GMT -5. The time now is 02:08 AM. |