document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. #!/bin/bash
  2. #make executeable with "chmod +x"
  3. #then place in /usr/bin/
  4.  
  5. totalLines=0
  6. FILES=*
  7.  
  8. for f in $FILES
  9. do
  10.     if [[ $f == "numOfLines.sh" ]]; then
  11.         continue
  12.     fi
  13.  
  14.     echo "Processing $f..."
  15.     lines=$(cat $f | wc -l)
  16.     totalLines=$(($lines + $totalLines))
  17. done
  18.  
  19. echo
  20. echo "Total num of lines in all files:"
  21. toilet $totalLines
');