KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have this Bash script and I had a problem in line 16. How can I take the previous result of line 15 and add it to the variable in line 16? #!/bin/bash num=0 metab=0 for ((i=1; i<=2; i++)); do for j in `ls output-$i-*`; do echo "$j" metab=$(cat $j|grep EndBuffer|awk '{sum+=$2} END { print sum/120}') (line15) num= $num + $metab (line16) done echo "$num" done
Tags (comma-separated)
Save Edits
Cancel