So Daniel's suggestion is valid, so I will advise a little on your question and general coding:
1. Please use [code][/code] tags around code and data to maintain formatting
2. Do not use 'ls' to feed a for loop (or generally any type of loop), see
here for more details
3. Although short and may not last long, if you try using meaningful variable names it can also assist with readability
4. Get in the practice of quoting all variables
5. grep is overkill in this scenario ... Check
here and search for regex on the page
6. On regexes (regular expressions), '.' refers to any character, hence, "R1_00." from your code says to look for the string
"R1_00" followed by any single character. If you wanted the string followed by a period (.) you need to escape it
using either - "\." or "[.]"
Hope some of that helps