[Shell programming] copy files that are interested in
OSX 2011. 7. 25. 13:53#!/bin/sh path="rgbd_data" cd ~/data # pwd ~/data for str in "ball" "food_box" do for index in $(ls ./rgbd_data/$str/) do mkdir $str/$index cp ./rgbd_data/$str/$index/$index\_1_[1-9]_*.png ./$str/$index/ done done