View Full Version : Select Multiple Objects by name?

06 June 2007, 11:11 PM
Hey guys, I am trying to use the `ls` command, and I have different lists of objects, for ex:

sphere1 sphere2 sphere3 sphere4 box1 box2 box3 box4

I know I can go through and do a `ls "box*"` or `ls "sphere*"`, then go through a for loop and delete them, but is there a way to do the ls command all in one line? so something like `ls "box*, sphere*"`? Any ideas would be appreciated. Thanks!

06 June 2007, 02:55 AM
string $list[]=`ls "sphere*" "box*"`;

just put them one after another

07 July 2007, 09:32 PM
Kevin! Thanks a ton, it works like a charm. For some reason I kept trying "sphere*, box*", but i never tried seperating the two into their own quotes. Thanks for your help!

CGTalk Moderation
07 July 2007, 09:32 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.