Wacky_rubia

sum

Dec 17th, 2013
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. func()
  4. {
  5. echo $5
  6. }
  7.  
  8. if [ "$1" == "--help" ]; then
  9. echo This_file_create_new_file
  10. exit
  11. fi
  12. sum=0
  13.  
  14. IFS=$(echo -en "\n\b")
  15. for line in $(ls -lR | grep " 1 ")
  16. do
  17. IFS=$(echo -en " \b")
  18. cur_size=$(func $line)
  19. IFS=$(echo -en "\n\b")
  20. sum=$(( $sum + $cur_size ))
  21. done
Advertisement
Add Comment
Please, Sign In to add comment