Permalink
Browse files

Make better of bash's arithmetic functionalities.

  • Loading branch information...
1 parent 0b95afd commit 8acbe2847def4106844d33bc84b2e94befd19613 @CasperVector CasperVector committed May 1, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/cdm
View
@@ -81,7 +81,7 @@ fi
# Generate the main menu.
menu=()
-for ((count=0; count<${#namelist[@]}; count++)); do
+for ((count = 0; count < ${#namelist[@]}; count++)); do
menu=("${menu[@]}" "$((count+countfrom))" "${namelist[${count}]}")
done
@@ -131,7 +131,7 @@ case ${flaglist[$binindex]} in
else
# Get the first empty display.
display=0
- while [[ "$display" < 7 ]]; do
+ while ((display < 7)); do
if dpyinfo=$(xdpyinfo -display ":$display.0" 2>&1 1>/dev/null) ||
# Display is in use by another user.
[[ "$dpyinfo" == 'No protocol specified'* ]]

0 comments on commit 8acbe28

Please sign in to comment.