Results 1 to 3 of 3

Thread: comparison

  1. #1
    Join Date
    Jan 2005
    Posts
    8

    Unanswered: comparison

    if -ge =greater /equal
    -le = less/ equal

    what if we want just equal
    i cannot used (=)

    eg:
    if [ $file_year = $curr_year ]
    echo "..."
    fi

    if [ $file_year = $curr_year + 1 ]--> this comparison also wrong
    echo"...
    else
    echo"....
    fi

  2. #2
    Join Date
    Jun 2004
    Posts
    20
    -eq - equal
    -ge - greater or equal
    -le - lesser or equal
    -lt - less than
    -gt - greater than
    -ne - not equal

  3. #3
    Join Date
    Jan 2005
    Posts
    8

    thanks

    it really help me...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •