Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- one=0
- two=0
- three=0
- four=0
- TIMEFORMAT=%R
- max=0
- for i in {0..9}
- do
- START_TIME=$(date +%s%3N)
- c="$i$two$three$four"
- #var=$(time ./pin $c)
- OUTPUT=$( ./pin $c)
- ELAPSED_TIME=$(expr $(date +%s%3N) - $START_TIME)
- #echo $ELAPSED_TIME
- if [ "$ELAPSED_TIME" -gt "$max" ];then
- max="$ELAPSED_TIME"
- one="$i"
- fi
- done
- echo $one
- for i in {0..9}
- do
- START_TIME=$(date +%s%3N)
- c="$one$i$three$four"
- #var=$(time ./pin $c)
- OUTPUT=$( ./pin $c)
- ELAPSED_TIME=$(expr $(date +%s%3N) - $START_TIME)
- #echo $ELAPSED_TIME
- if [ "$ELAPSED_TIME" -gt "$max" ];then
- max="$ELAPSED_TIME"
- two="$i"
- fi
- done
- echo $two
- for i in {0..9}
- do
- START_TIME=$(date +%s%3N)
- c="$one$two$i$four"
- #var=$(time ./pin $c)
- OUTPUT=$( ./pin $c)
- ELAPSED_TIME=$(expr $(date +%s%3N) - $START_TIME)
- #echo $ELAPSED_TIME
- if [ "$ELAPSED_TIME" -gt "$max" ];then
- max="$ELAPSED_TIME"
- three="$i"
- fi
- done
- echo $three
- for i in {0..9}
- do
- START_TIME=$(date +%s%3N)
- c="$one$two$three$i"
- #var=$(time ./pin $c)
- OUTPUT=$( ./pin $c)
- ELAPSED_TIME=$(expr $(date +%s%3N) - $START_TIME)
- #echo $ELAPSED_TIME
- if [ "$ELAPSED_TIME" -gt "$max" ];then
- max="$ELAPSED_TIME"
- four="$i"
- fi
- #sleep 1
- done
- echo $four
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement