summinf values in bash
hi! i'm trying to get all the regular files opened by all the processes in the current session. I have this code
while read pid do FILES_ACTUAL=$(lsof -p $pid | grep REG | wc -l) done < <(ps -o pid,tt -u $USER | grep $CURRENT_TERMINAL | awk '{print $1}') echo $FILES_ACTUAL but i dont know how to add up, inside the while, the variable $FILES_ACTUAL.. I tried to use the awk command, but i couldnīt do it. |
Code:
SUM=0 |
Some other suggestions for your code:
Code:
SUM=0 |
All times are GMT -5. The time now is 08:28 PM. |