X-Git-Url: https://git.distorted.org.uk/~mdw/misc/blobdiff_plain/4641d6e29bb77342a80a494484f5575ad39bf3f8..f9f9787aa08f519b3df9953a6b8877f7e65950f0:/hush.in diff --git a/hush.in b/hush.in index d5aebcb..2752cdf 100755 --- a/hush.in +++ b/hush.in @@ -167,16 +167,16 @@ exec 3>&- nlog=0 for i in "$logdir/$tag".*; do if [ ! -f "$i" ]; then continue; fi - nlog=$(( nlog + 1 )) + nlog=$(( $nlog + 1 )) done ## If there are too many, go through and delete some early ones. if [ $nlog -gt $maxlog ]; then - n=$(( nlog - maxlog )) + n=$(( $nlog - $maxlog )) for i in "$logdir/$tag".*; do if [ ! -f "$i" ]; then continue; fi rm -f "$i" - n=$(( n - 1 )) + n=$(( $n - 1 )) if [ $n -eq 0 ]; then break; fi done fi