from https://codingchallenges.fyi/challenges/challenge-wc/ by https://twitter.com/johncrickett
Since a few years I am in C# but I wanted to try out java for this challenge.
package manager: gradle
I am using following libraries as support
- command line tool:
- info.picocli:picocli
- https://picocli.info/
I use gradle version 7.3 and this is related to java 17 using OpenJDK
- checkout comp matrix https://docs.gradle.org/current/userguide/compatibility.html
you need to start folder "no-1" as your main folder (not in the parent folder)
./gradlew clean installDist
without any parameter you will see the help information
./wc.sh
Missing required parameter: '<file>'
Usage: ccwc [-chlVw] <file>
counts the number for lines, words, characters
<file> The file to calculate for.
-c -c for counting characters
-h, --help Show this help message and exit.
-l -l for counting lines
-V, --version Print version information and exit.
-w -l for counting words
Open 3 terminals and start in each
./wc.sh app/src/test/resources/text.txt
7137 58159 341836 text.txt
line count
./wc.sh -l app/src/test/resources/text.txt
7137 text.txt
Thanks https://twitter.com/johncrickett for the great challenge
I fully recommend this challenges for all Software Engineers who would like get better https://codingchallenges.fyi/challenges/challenge-load-balancer/