Created
October 21, 2011 06:36
-
-
Save zhhailon/1303244 to your computer and use it in GitHub Desktop.
Make some dirs according to existing files and copy the file into the corresponding dir.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
k8_dir=~/Documents/lab/k8/ | |
k8_java_dir="$k8_dir"/k8_java/ | |
dest_dir=~/src/ | |
for full_name in `ls "$k8_java_dir"`; do | |
name=${full_name%*.mht} | |
echo $name | |
dir="$dest_dir""$name" | |
`mkdir "$dir"` | |
echo "$dir created" | |
`cp "$k8_java_dir""$full_name" "$dir"` | |
echo "File $full_name copied" | |
`touch "$dir"/TestCase.java` | |
echo "TestCase.java created" | |
echo "=====================" | |
done | |
# end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment