mirror of
https://github.com/pkivolowitz/asm_book.git
synced 2026-06-21 02:26:59 +08:00
just for curiosity - does word and line count
This commit is contained in:
parent
520f11ad96
commit
69c2a4c465
1 changed files with 10 additions and 0 deletions
10
counts.bash
Executable file
10
counts.bash
Executable file
|
|
@ -0,0 +1,10 @@
|
||||||
|
#!/bin/bash
|
||||||
|
find . -print 2> /dev/null | egrep -i -e ".md" > /tmp/md 2> /dev/null
|
||||||
|
find . -print 2> /dev/null | egrep -i -e "\.c$" -e "\.cpp$" > /tmp/c 2> /dev/null
|
||||||
|
find . -print 2> /dev/null | egrep -i -e "\.s$" > /tmp/s 2> /dev/null
|
||||||
|
echo Text \(words\)
|
||||||
|
xargs wc -w < /tmp/md 2> /dev/null | tail -n 1
|
||||||
|
echo C and C++ \(lines\)
|
||||||
|
xargs wc -l < /tmp/c 2> /dev/null | tail -n 1
|
||||||
|
echo Assembly Language \(lines\)
|
||||||
|
xargs wc -l < /tmp/s 2> /dev/null | tail -n 1
|
||||||
Loading…
Reference in a new issue