このページに関してのお問い合わせはこちら
さて!自慢の数行スクリプト
ツイート
31
:
名無しさん@お腹いっぱい。
:
2001/03/05(月) 01:20
#!/bin/sh
# this script can repeat a certain command
# ex. scriptname 10 ls
i=0
if [ $# -lt 2 ]
then
echo "usage:$0 number command"
exit
fi
num=$1
shift
while [ $i -lt $num ]
do
$*
i=`expr $i + 1`
done
exit