ed1 コマンドのソース


#!/bin/csh

echo "この directory 上のあなたの file のグループを ed1 にします。"
echo "また 所有権を 775 (directory) 664 (file) に変えます。"
echo "作業を開始します。終了まで少し御待ち下さい。"
# 全ての file, directory で

foreach i (*)

# もし所有者であったら

if (-o "$i") then

#echo $i is changed to ed1 and chmod.
chgrp ed1 $i

# もし directory であったら

if (-d "$i") then

#echo $i is a directory.
chmod 775 $i

# さもなくば file であったら

else if (-f "$i") then

if(-x "$i") then
#echo $i is an excutable plain file.
chmod 775 $i
else
#echo $i is a plain file.
chmod 664 $i
endif

else 

echo $i is not recognized.
endif
endif
#
end
echo " 全ての作業を 無事に 終了しました。"
echo " 共有文書を編集した場合にはこの ed1 を実行してください。"

戻る
管理者: shimizu@tube.ee.uec.ac.jp,