bash awk
페이지 정보
작성자 조희승 댓글 0건 조회 6,806회 작성일 15-02-22 19:36본문
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
----------------------------------------
awk 구분자 여러개
Read 2Gb Written 0b Total transferred 2Gb (239.89Mb/sec)
grep "Mb/sec" | awk -F '[(M]' '{print $2}'
239.89
-----------------------------------
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
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
----------------------------------------
awk 구분자 여러개
Read 2Gb Written 0b Total transferred 2Gb (239.89Mb/sec)
grep "Mb/sec" | awk -F '[(M]' '{print $2}'
239.89
-----------------------------------
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
댓글목록
등록된 댓글이 없습니다.