Skip to content

Instantly share code, notes, and snippets.

@rcanepa
Last active August 8, 2016 01:37
Show Gist options
  • Save rcanepa/b682ff0b73c7f5834e2df58c48768679 to your computer and use it in GitHub Desktop.
Save rcanepa/b682ff0b73c7f5834e2df58c48768679 to your computer and use it in GitHub Desktop.
Playing with UNIX
- Count the number of namespaces
1) find all .clj files under src/scv2backend/ directory,
2) find all the lines which contains the words 'ns scv2',
3) split the line by a white space and return the second half,
4) count the number of lines
find src/scv2backend/ -name '*.clj' |
xargs grep -h 'ns scv2' |
cut -d ' ' -f 2 |
wc -l
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment