2 Replies - 542 Views - Last Post: 26 June 2013 - 01:35 PM Rate Topic: -----

#1 nautica17  Icon User is offline

  • D.I.C Head

Reputation: 6
  • View blog
  • Posts: 155
  • Joined: 28-August 09

Command line wildcard question

Posted 25 June 2013 - 07:30 AM

I wasn't sure where to put this, so apologies if this is the wrong spot.

So I'm working with wildcards and I'm not sure how to go about the following..

Say I have a directory structure: /stuff/more_stuff/[these sub-directories: 0000, 0100, 0200.... 2200, 2300]/stuff_again/*

I'm inputting a bunch of files into a program I wrote but I only want files from certain sub-directories. Say that I want files from sub-directories 0500 through 1500. How would I go about doing so with wildcards?

Here is what I have: /stuff/more_stuff/*[5-15]00/stuff_again/*

This doesn't work and I can't use bracket expansion in my scenario. Any help is appreciated.

Is This A Good Question/Topic? 0
  • +

Replies To: Command line wildcard question

#2 #define  Icon User is offline

  • Duke of Err
  • member icon

Reputation: 1432
  • View blog
  • Posts: 4,968
  • Joined: 19-February 09

Re: Command line wildcard question

Posted 26 June 2013 - 01:23 PM

View Postnautica17, on 25 June 2013 - 03:30 PM, said:

This doesn't work and I can't use bracket expansion in my scenario. Any help is appreciated.



Do you mean bracket expansion is unavailable?

Maybe split in two
ls /stuff/more_stuff/0[5-9]00/stuff_again/*
ls /stuff/more_stuff/1[0-5]00/stuff_again/*


This post has been edited by #define: 26 June 2013 - 01:53 PM

Was This Post Helpful? 0
  • +
  • -

#3 jon.kiparsky  Icon User is offline

  • Pancakes!
  • member icon


Reputation: 8029
  • View blog
  • Posts: 13,741
  • Joined: 19-March 11

Re: Command line wildcard question

Posted 26 June 2013 - 01:35 PM

This may be a situation where you're trying to be a little more clever than you need to be. Would it not be easier to script it than to come up with the correct magical incantation?
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1