#This copies html guide text files out of /gc/amrlg/htmlguid #into their respective directories for i in $(ls *.html) do new_dir=$(echo ${i} | cut -c1-4) cp ${i} ../${new_dir}/ done