Skip to content

Commit

Permalink
Use integer comparison in bench.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
vitalif committed Feb 6, 2022
1 parent 7d5cf2a commit 17045d2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bench/bench.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ function ls_files {
get_howmany $@
# people usually use ls in the terminal when color is on
numfiles=$(ls -1 --color=always | wc -l)
if [ "$numfiles" != "$howmany" ]; then
if [ "$numfiles" -ne "$howmany" ]; then
echo "$numfiles != $howmany"
false
fi
Expand All @@ -95,7 +95,7 @@ function rm_files {
function find_files {
numfiles=$(find . | wc -l)

if [ "$numfiles" != 820 ]; then
if [ "$numfiles" -ne 820 ]; then
echo "$numfiles != 820"
rm_tree
exit 1
Expand Down

0 comments on commit 17045d2

Please sign in to comment.