Copyright © Michele Biondi, Samuele Cucchi
This is the repository for the project of Operating Systems lab at University of Camerino, Italy.
SwordX is a command line tool to count word occurences inside of files.
Inside program folder
make
make install # as rootYou should be able to use the 'swordx' command from anywhere.
As an alternative you can build files using Docker, the steps become (run as root):
# make sure to remove old compiled files
./build_docker.sh
make installYou can also run swordx from the official container:
docker run --rm -v $TARGET_FOLDER:/files -v $OUTPUT_FOLDER:/output an4cr0n/swordx:latest [options] To remove the program just run as root inside program folder
make uninstallTo list all options run:
swordx --helpBy default the program will save results in a file called 'swordx.out' inside current folder.
Read words from file sample.txt and sample2.txt
swordx sample.txt sample2.txtRead words from folder samples and write results to 'output.txt' and sort results by occurences
swordx sample/ -s -o output.txtTo run tests you need the cunit framework, on debian based systems you need to run as root:
apt-get update
apt-get install libcunit1 libcunit1-devNext you can run tests using:
make # if you didn't run it previously
make test