#!bin/sh
cd java设计模式程序源代码
for var in *
do
cd $var
for var2 in *
do
# echo $var"->"$var2
# mv $var2 "c"`echo $var2|sed 's/\.//g'`
cd $var2
for var3 in `ls|grep java`
do
# echo $var"->"$var2"->"$var3
sed -i "1i package tsinghua.$var.$var2;" $var3
done
cd ..
done
cd ..
done
转载于:https://www.cnblogs.com/pascal-poincare/p/5508415.html