bash syntax
페이지 정보
작성자 조희승 댓글 0건 조회 4,898회 작성일 16-08-02 10:01본문
argc=$#
if [ $argc -lt 2 ] ;then
echo "input parameter"
exit
fi
if [ "$1" == "" ] ; then
echo "nmon.sh [time]"
exit
fi
for (( c=1; c<=5; c++ )); do
echo "Welcome $c times..."
done
for i in {1..5}; do
echo "Welcome $i times"
done
for i in {0..10..2}; do
echo "Welcome $i times"
done
for i in 200 400 600 800 1000 1200 1400 1600 1800 2000; do
echo ./matrixMul.arm $i $1
./matrixMul.arm $i $1
done
----------------------------------------
ls | awk -F ' ' '{print $4}'
-----------------------------------
peakmem.sh
max=0
sync; echo 3 > /proc/sys/vm/drop_caches; sleep 1; free -o
while [ 1 ]
do
cur=`free | grep Mem: | awk '{print $3}'`
if [ $cur -gt $max ]
then
max=$cur
fi
echo $cur $max
sleep 1
done
if [ $argc -lt 2 ] ;then
echo "input parameter"
exit
fi
if [ "$1" == "" ] ; then
echo "nmon.sh [time]"
exit
fi
for (( c=1; c<=5; c++ )); do
echo "Welcome $c times..."
done
for i in {1..5}; do
echo "Welcome $i times"
done
for i in {0..10..2}; do
echo "Welcome $i times"
done
for i in 200 400 600 800 1000 1200 1400 1600 1800 2000; do
echo ./matrixMul.arm $i $1
./matrixMul.arm $i $1
done
----------------------------------------
ls | awk -F ' ' '{print $4}'
-----------------------------------
peakmem.sh
max=0
sync; echo 3 > /proc/sys/vm/drop_caches; sleep 1; free -o
while [ 1 ]
do
cur=`free | grep Mem: | awk '{print $3}'`
if [ $cur -gt $max ]
then
max=$cur
fi
echo $cur $max
sleep 1
done
댓글목록
등록된 댓글이 없습니다.