Advertisement
shadowsofme

createReport

Dec 6th, 2016
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.46 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. FNAME=$1
  4. i=0
  5.  
  6. echo ""
  7.  
  8. rm $FNAME 2> /dev/null
  9. while read thing
  10. do
  11.     let "i += 1"   
  12.     echo $thing
  13.     echo $thing >> $FNAME
  14. done;
  15.  
  16. j=$(cat orig.txt | wc -l)
  17.  
  18. echo ""
  19. echo "The number of lines in the input file is $j."
  20. echo "The number of lines in the output file is $i."
  21.  
  22. echo "" >> $FNAME
  23. echo "The number of lines in the input file is $j." >> $FNAME
  24. echo "The number of lines in the output file is $i." >> $FNAME
  25.  
  26. echo ""
  27.  
  28. rm orig.txt
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement