xcorp::When it rains, it pours.

"The nice thing about rain," said Eeyore, "is that it always stops. Eventually."

#!/bin/csh

cshスクリプトなんか書くなよ。だからそういう目に遭うんだよ。

[root@ipmi ~]# cat csh.sh
#!/bin/csh
set DIR1=/var/nas1/
set DIR2=work
echo "rm -rf $DIR1/$DIR2/*"
[root@ipmi ~]# /bin/sh ./csh.sh
[root@ipmi ~]# rm -rf //*
[root@ipmi ~]# /bin/bash ./csh.sh
[root@ipmi ~]# rm -rf //*

あと、ちゃんとテストすれ。当たり前のことをやらんからこういうことになる。自戒を込めて。

追記

csh インストールされてないじゃん!! こりゃ最低ですな。