Guest_imported
New member
- Jan 1, 1970
- 0
I am trying to write a bash script that reads a list of number until 999 is read, and then prints the total of all the number together. This what I got so far can someone tell me what am I doing wrong.
#!/bin/bash
Echo "Enter the Num:"
read num
sum = 0
while [ sum -ne 999 ];
do
let sum + sum = num
echo "Enter another Num"
read num
done
#!/bin/bash
Echo "Enter the Num:"
read num
sum = 0
while [ sum -ne 999 ];
do
let sum + sum = num
echo "Enter another Num"
read num
done