There are quite a few methods you could use for this: here's one for which I'll give you the literary algorithm, but you're going to have to write the code:
1. Prompt for the limit.
2. Iterate through the list.
3. For each iteration, test if the number is even (modulo division, perhaps).
4. Create a separate variable that represents the sum of the even numbers, and everytime the loop stumbles upon an even number add the number to the existing value of the variable (sum_of_evens += num).
Here's another one:
1. Prompt for the limit.
2. Fill an array/list with all values from 0 to the limit.
3. Since even numbers exist an even intervals (every other number is even), just iterate through the list. I'm not sure the BASH syntax, but C/C++/Java syntax would be:
Code:
for (int x = 0; x < listofnumbers.length; x += 2) { ...body...}
. The idea is instead of iterating by an interval of 1, iterate by an interval of 2).
4. Create a separate variable that represents the sum of the even numbers, and everytime the loop stumbles upon an even number add the number to the existing value of the variable (sum_of_evens += num).