This repository has been archived by the owner on Mar 24, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 182
/
countByAuthors.sh
41 lines (29 loc) · 1.98 KB
/
countByAuthors.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/bin/bash
# TODO, generate this shell automatically
echo "#### Order by Join time" > countByAuthors.md
echo "#### 1.Scala" >> countByAuthors.md
echo "dreamylost:=> "`find ./scala-leetcode/src/main/scala/io/github/dreamylost -name "Leetcode*.scala" | wc -l | awk '{print $1}'` >> countByAuthors.md
echo "" >> countByAuthors.md
echo "sweeneycai:=> "`find ./scala-leetcode/src/main/scala/io/github/sweeneycai -name "Leetcode*.scala" | wc -l | awk '{print $1}'` >> countByAuthors.md
echo "" >> countByAuthors.md
echo "#### 2.Java (match *.Java)" >> countByAuthors.md
echo "dreamylost:=> "`find ./java-leetcode/src/main/java/io/github/dreamylost -name "*.java" | wc -l | awk '{print $1}'` >> countByAuthors.md
echo "" >> countByAuthors.md
echo "ccccmaster:=> "`find ./java-leetcode/src/main/java/io/github/ccccmaster -name "*.java" | wc -l | awk '{print $1}'` >> countByAuthors.md
echo "" >> countByAuthors.md
echo "poorguy:=> "`find ./java-leetcode/src/main/java/io/github/poorguy -name "*.java" | wc -l | awk '{print $1}'` >> countByAuthors.md
echo "" >> countByAuthors.md
echo "wkk:=> "`find ./java-leetcode/src/main/java/io/github/wkk -name "*.java" | wc -l | awk '{print $1}'` >> countByAuthors.md
echo "" >> countByAuthors.md
echo "#### 3.Rust" >> countByAuthors.md
dreamylostLeetcode=`find ./rust-leetcode/src -name "leetcode*.rs" | wc -l | awk '{print $1}'`
dreamylostInterview=`find ./rust-leetcode/src -name "interview*.rs" | wc -l | awk '{print $1}'`
echo "dreamylost:=> "$(($dreamylostLeetcode + $dreamylostInterview)) >> countByAuthors.md
echo "" >> countByAuthors.md
echo "#### 4.Kotlin" >> countByAuthors.md
echo "dreamylost:=> "`find ./kotlin-leetcode/src/main/kotlin/io/github/dreamylost -name "Leetcode*.kt" | wc -l | awk '{print $1}'` >> countByAuthors.md
echo "" >> countByAuthors.md
echo "#### 5.Python" >> countByAuthors.md
echo "laozhang:=> "`find ./python-leetcode/laozhang -name "leetcode*.py" | wc -l | awk '{print $1}'` >> countByAuthors.md
echo "" >> countByAuthors.md
## append