![]() ![]() | ![]() |
1.1 ! snw 1: #!/bin/bash ! 2: ! 3: TOTAL=0 ! 4: LOC=0 ! 5: ! 6: for FILE in src/*.[ch] mlib/*.m ! 7: do ! 8: LOC=$(cat "${FILE}" | wc -l) ! 9: echo "${FILE}: ${LOC} lines" ! 10: TOTAL=$((${TOTAL} + ${LOC})) ! 11: done ! 12: ! 13: echo "" ! 14: echo "${TOTAL} total LOC"