Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- #make executeable with "chmod +x"
- #then place in /usr/bin/
- totalLines=0
- FILES=*
- for f in $FILES
- do
- if [[ $f == "numOfLines.sh" ]]; then
- continue
- fi
- echo "Processing $f..."
- lines=$(cat $f | wc -l)
- totalLines=$(($lines + $totalLines))
- done
- echo
- echo "Total num of lines in all files:"
- toilet $totalLines
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement