On Thu, Mar 26, 2015 at 11:16:02AM -0400, Jan Tulak wrote: > > > + for found in `tail -n +$line $tdir/group | $AWK_PROG '{ print $1 }'`; do > > > + foundId=$(echo "$found" | tr - ' ' | $AWK_PROG '{ print $1 }') > > > + line=$((line+1)) > > > + if [ -z "$found" ] || [ "$found" == "#" ]; then > > > + continue > > > + elif [[ "$found" > "$name" ]] || [ "$foundId" -gt "$id" ]; then > > > > Bash guide advices not to use [[ ]] for arithmetic expressions, in favor > > of (( )). Besides, I find mixing [[ ]] and [ ] inconsistent, choose one. > > The [[ "$found" > "$name" ]] is a string expression, for lexicographic ordering. :-) Ah, I see, then it's correct. > The second [ ] is for arithmetic - so I used the mix of [[]] and [] > deliberately to distinguish it. Though if it is a bad practise, I will > stick to not mixing it in one condition. And [ -gt ] is ok. -- To unsubscribe from this list: send the line "unsubscribe fstests" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html