On , Martijn Koster <mak-alug@greenhills.co.uk> wrote:
> dash says:
>
>
>
> [: 6: -lt: unexpected operator
>
>
>
> The problem is that -lt wants a integer on the left, and there isn't.
>
> So you want to repeat the $1:
>
>
>
> if [ "$1" -ge 128 -a "$1" -lt 192 ]
>
>
>
>
> Also I have in the mean time settled with;
Thanks Martijn thats seems obvious now!
> if [ "$1" -ge 128 ]&& [ $1 -lt 192 ]
>
>
>
> Is either one of these preferred over the other?
>
> That is clearer to my eyes (but be consistent in your quoting of $1).
Oh, I missed that, that was I typo because I didn't mean to have quotes there. I assume this is correct since $1 is an integer, do you know if this is the case?