From: Robert Klemme Date: 2013-01-10T00:55:10+09:00 Subject: Re: One liner for filenames On Wed, Jan 9, 2013 at 4:48 PM, Jesús Gabriel y Galán wrote: > On Wed, Jan 9, 2013 at 4:09 PM, Robert Klemme > wrote: >> ruby -r pathname -e 'Pathname.glob("*[^1].png").each(&:delete)' > > Careful, as this skips also filename_11.png, filename_21.png, etc. > Building on this: > > ruby -r pathname -e 'Pathname.glob("*_{[^1],??}.png").each(&:delete)' +1 I wasn't aware that there could be larger numbers. Thank you for the correction! Cheers robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/