Guest User

Untitled

a guest
Nov 23rd, 2017
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.94 KB | None | 0 0
  1. wc -l *.php
  2.  
  3. find . -name '*.php' | wc -l
  4.  
  5. find . -name '*.php' | xargs wc -l
  6.  
  7. ( find ./ -name '*.php' -print0 | xargs -0 cat ) | wc -l
  8.  
  9. wc -l **/*.php
  10.  
  11. shopt -s globstar
  12.  
  13. $ cloc --exclude-lang=DTD,Lua,make,Python .
  14. 2570 text files.
  15. 2200 unique files.
  16. 8654 files ignored.
  17.  
  18. http://cloc.sourceforge.net v 1.53 T=8.0 s (202.4 files/s, 99198.6 lines/s)
  19. -------------------------------------------------------------------------------
  20. Language files blank comment code
  21. -------------------------------------------------------------------------------
  22. Javascript 1506 77848 212000 366495
  23. CSS 56 9671 20147 87695
  24. HTML 51 1409 151 7480
  25. XML 6 3088 1383 6222
  26. -------------------------------------------------------------------------------
  27. SUM: 1619 92016 233681 467892
  28. -------------------------------------------------------------------------------
  29.  
  30. 59 text files.
  31. 56 unique files.
  32. 5 files ignored.
  33.  
  34. http://cloc.sourceforge.net v 1.53 T=0.5 s (108.0 files/s, 50180.0 lines/s)
  35. -------------------------------------------------------------------------------
  36. Language files blank comment code
  37. -------------------------------------------------------------------------------
  38. C 36 3060 1431 16359
  39. C/C++ Header 16 689 393 3032
  40. make 1 17 9 54
  41. Teamcenter def 1 10 0 36
  42. -------------------------------------------------------------------------------
  43. SUM: 54 3776 1833 19481
  44. -------------------------------------------------------------------------------
  45.  
  46. find . -name '*.php' | xargs wc -l
  47.  
  48. $ find -name '*.php' | xargs cat | wc -l
  49.  
  50. wc `find . -name '*.[h|c|cpp|php|cc]'`
  51.  
  52. find . -type f -exec wc -l {} ; | awk '{ SUM += $0} END { print SUM }'
  53.  
  54. find . -name *.py -exec wc -l {} ; | awk '{ SUM += $0} END { print SUM }'
  55.  
  56. find . -name '*.php' -type f | xargs wc -l
  57.  
  58. find . -name '*.php' -type f | sort | xargs wc -l
  59.  
  60. find . -name '*.php' -type f | xargs wc -l | sort -nr
  61.  
  62. find . -name '*.php' -type f | xargs cat | wc -l
  63.  
  64. find . -name '*.php' -type f -exec cat -- {} + | wc -l
  65.  
  66. wc `find`
  67.  
  68. wc `find | grep .php$`
  69.  
  70. total_count=0
  71. for file in $(find . -name *.php -print)
  72. do
  73. count=$(wc -l $file)
  74. let total_count+=count
  75. done
  76. echo $total_count
  77.  
  78. find . -type f -name '*.php' -exec bash -c 'wc -l "$0"' {} ; | awk '{s+=$1} END {print s}'
  79.  
  80. #this example prints line count for all found files
  81. total=0
  82. find /path -type f -name "*.php" | while read FILE; do
  83. #you see use grep instead wc ! for properly counting
  84. count=$(grep -c ^ < "$FILE")
  85. echo "$FILE has $count lines"
  86. let total=total+count #in bash, you can convert this for another shell
  87. done
  88. echo TOTAL LINES COUNTED: $total
  89.  
  90. wc -l `tree -if --noreport | grep -e'.php$'`
  91.  
  92. cat `/gnuwin32/bin/find.exe . -name *.php` | wc -l
  93.  
  94. find . -name '*.php' | xargs wc -l | sort -r
  95.  
  96. find . -name '*.php' | xargs wc -l | sort -nr | egrep -v "libs|tmp|tests|vendor" | less
  97.  
  98. wc -l `find . -name "*.php"`
  99.  
  100. find /path -type f -name "*.php" | while read FILE
  101. do
  102. count=$(wc -l < $FILE)
  103. echo "$FILE has $count lines"
  104. done
  105.  
  106. $cd directory
  107. $wc -l* | sort -nr
  108.  
  109. ECHO OFF
  110. for /r %%G in (*.php) do (
  111. busybox grep . "%%G" | busybox wc -l
  112. )
  113.  
  114. find ./ -type f -exec wc -l {} ; | cut -d' ' -f1 | paste -sd+ | bc
  115.  
  116. wc -l `find . -name "*.php"`
  117.  
  118. wc -l $(find . -name "*.php")
Add Comment
Please, Sign In to add comment