1
if [ (( $year >= $3 )) ] && [ ((  $year <= $4 )) ]

Errors:

line 11: syntax error near unexpected token `('
line 11: `      if [ (( $year >= $3 )) ] && [ ((  $year <= $4 )) ] '

$3 and $4 are numbers, and year is a local variable and number too.

Whats the problem here? I can't get it.

4
  • This is almost certainly a duplicate, but the linked question is not the same. Nov 4, 2014 at 11:39
  • What do you mean, @WilliamPursell ? Isn't it a duplicate to the one I mentioned? If so, I can reopen and you can reclose to a more-proper one.
    – fedorqui
    Nov 4, 2014 at 12:04
  • The linked question provides the answers, and is probably fine. At the time it seemed like this question was more specific, but perhaps this question should be rephrased more generally as in the linked duplicate. No need to take any action. Nov 4, 2014 at 12:14
  • thanks guys I solvd the problem using the link you posted. Nov 4, 2014 at 12:30

0

Browse other questions tagged or ask your own question.