#This script pulls out items and files in a pipe-delimited #text file #remove old liz_meta_items.txt file rm liz_meta_items.txt #List and go to the convenience groups (do an ls -l, grep out #the lines that are directories [start with d], and cut from #column 55 to the end cd /mss/mgw for x in $(echo "mgw1a" "mgw1b" "mgw1c" "mgw2" "mgw3a" "mgw3b" "mgw3c" "mgw3d" "mgw3e" "mgw3f" "mgw3g" "mgw3h" "mgw4" "mgw5" "mgw6a" "mgw6b" "mgw6c" "mgw7" "mgw8a" "mgw8b" "mgw8c" "mgw8d") do cd ${x} conv_group_dir=$(pwd) #go to the item directories and get the item names for y in $(ls -l | grep "^d" | cut -c55-) do cd ${y} #get the actual files and put them into a pipe-delimted file for z in $(ls -1) do filedate=$(ls -ld "${z}" | cut -c42-54) filesize=$(ls -ld "${z}" | cut -c33-41) print "${conv_group_dir}|${y}|${z}|${filedate}|${filesize}" >> /mss/mgw/liz_meta_items.txt done #return to the convenience group for loop cd ${conv_group_dir} done #go back to the top for the next round cd /mss/mgw done print "DONE"