Guest User

Untitled

a guest
May 25th, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.26 KB | None | 0 0
  1. #! /bin/bash
  2.  
  3. # TODO: prints error if < 2 arguments
  4.  
  5.  
  6. output="${1}"
  7.  
  8. date>>"${1}"
  9.  
  10. count=0;
  11.  
  12. while [ $# -gt 1 ]
  13. do
  14.   numlines=wc -l "#{2}"
  15.   echo $numlines #Does it work?
  16.   (( count=$count+$numlines ))
  17.   shift
  18. done
  19.  
  20. # echo "$count total">>"$output"
Add Comment
Please, Sign In to add comment