/home/servers2 に多数のディレクトリがあり (数千のように)、server2 の各ディレクトリには plugins Ex というディレクトリがあります。/home/servers2/MyServer/プラグイン
現在、それぞれに AutoStopFinal.jar というファイルがあります。これを削除して、AutoStop1.3.001 を /home/servers/template/plugins からプラグイン ディレクトリにコピーする必要があります。非破壊的にテストしたかったので、これを試しました:
echo " Script to copy a plugin to all server plugin directories"
for i in /home/servers2/*/plugins; do
echo rm -f $i/AutoStopFinal.jar
echo cp -f /home/servers/template/plugins/AutoStop1.3.001.jar "$i"
done
echo " completed script ..."
しかし、プラグインをすべてのサーバープラグインディレクトリにコピーするスクリプトしかありませんでした。私は約5分後にC'dをコントロールしました。しかし、ループ内からエコーがありませんでした。何かアドバイスはありますか?