Skip to content

Commit

Permalink
Make the tst.sh workload can be configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
lipzhu committed Mar 1, 2023
1 parent 6705203 commit 624b501
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion UnixBench/pgms/multi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
ID="@(#)multi.sh:3.4 -- 5/15/91 19:30:24";
instance=1
while [ $instance -le $1 ]; do
/bin/sh "$UB_BINDIR/tst.sh" &
/bin/sh "$UB_BINDIR/tst.sh" 20 &
instance=$(($instance + 1))
done
wait
Expand Down
3 changes: 2 additions & 1 deletion UnixBench/pgms/tst.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
#
###############################################################################
ID="@(#)tst.sh:3.4 -- 5/15/91 19:30:24";
sort >sort.$$ <sort.src
sort_src_content=$(cat sort.src)
printf "$sort_src_content%.0s\n" $(seq $1) | sort > sort.src.$$
od sort.$$ | sort -n -k 1 > od.$$
grep the sort.$$ | tee grep.$$ | wc > wc.$$
rm sort.$$ grep.$$ od.$$ wc.$$

0 comments on commit 624b501

Please sign in to comment.