#!/bin/bash

echo "霆「騾√b縺ィ縺ョ繝�ぅ繝ャ繧ッ繝医Μ��"
read Tensoumoto
#霆「騾∝�繝�ぅ繝ャ繧ッ繝医Μ繧定◇縺�

echo "霆「騾∝�縺ョ繝�ぅ繝ャ繧ッ繝医Μ��"
read Tensousaki
#霆「騾∝�繝�ぅ繝ャ繧ッ繝医Μ繧定◇縺�

echo "螳溯。悟燕:霆「騾∝�繝�ぅ繝ャ繧ッ繝医Μ蜀��險ア蜿ッ螻樊€ァ縺ッ縲~ls -lF $Tensoumoto`"
echo "螳溯。悟燕:霆「騾∝�繝�ぅ繝ャ繧ッ繝医Μ蜀��險ア蜿ッ螻樊€ァ縺ッ縲~ls -lF $Tensousaki`"
#荳。繝�ぅ繝ャ繧ッ繝医Μ縺ョ謖√▲縺ヲ縺�k繝輔ぃ繧、繝ォ縲∬ィア蜿ッ螻樊€ァ繧定。ィ遉コ

cd $Tensoumoto
#霆「騾∝�繝�ぅ繝ャ繧ッ繝医Μ縺ォ遘サ縺」縺ヲ

for loop in *
do
#繝�ぅ繝ャ繧ッ繝医Μ蜀��縺吶∋縺ヲ縺ョ繧ゅ�縺ォ縺、縺�※

if [ -d $loop ] ;then
#繝�ぅ繝ャ繧ッ繝医Μ縺九←縺�°縺ョ繝�せ繝育オ先棡縺檎悄縺ァ縺ゅl縺ー

cp -r $loop $Tensousaki
#霆「騾∝�繝�ぅ繝ャ繧ッ繝医Μ縺ォ繧ウ繝斐�縺励€�

chmod 775 $Tensousaki/$loop
#險ア蜿ッ螻樊€ァ繧�775縺ォ螟峨∴繧九€�

else
#蛛ス縺ェ繧�(繝�ぅ繝ャ繧ッ繝医Μ縺ァ縺ッ縺ェ縺�°繧峨ヵ繧。繧、繝ォ縺ェ縺ョ縺ァ)

cp $loop $Tensousaki
#霆「騾∝�縺ォ繧ウ繝斐�縺�
縲�
chmod 664 $Tensousaki/$loop
#險ア蜿ッ螻樊€ァ繧�664縺ォ螟峨∴繧九€�

fi
done

cd $Tensousaki
#譛€蠕後↓霆「騾∝�繝�ぅ繝ャ繧ッ繝医Μ縺ォ遘サ縺」縺ヲ

chmod 775 *.sh
#繧ケ繧ッ繝ェ繝励ヨ縺ョ險ア蜿ッ螻樊€ァ繧�775縺ォ螟峨∴繧�


echo "螳溯。悟セ�:霆「騾∝�繝�ぅ繝ャ繧ッ繝医Μ蜀��險ア蜿ッ螻樊€ァ縺ッ縲~ls -lF $Tensousaki`"
#霆「騾∝�繝�ぅ繝ャ繧ッ繝医Μ縺後←縺�↑縺」縺溘°陦ィ遉コ(邨ゆコ�)


蜑阪�繝シ繧ク縺ク