The File Operations (Fops) CLI, a resilient command line application written in Golang to count line and checksum files.
git clone https://github.com/cdvel/fops-cli
cd fops-cli
make
./fops help
Once installed, the CLI is used via the following standard format:
fops <command> <file> <flags>
This CLI supports the following commands:
-
linecount
- Count the number of lines in a file -
checksum
- Find the checksum of a file using md5, sha1 or sha256 -
version
- Get the current version of Fops -
help
- Print help
Flag | Shorthand | Description | Example |
---|---|---|---|
--file |
-f |
Filename to be queried. | linecount -f my-sample.txt |
--md5 |
NA |
Use MD5 algorith to checksum a file. | checksum --md5 |
--sha1 |
NA |
Use SHA1 algorith to checksum a file. | checksum --sha1 |
--sha256 |
NA |
Use SHA256 algorith to checksum a file. | checksum --sha26 |
- barebones cli with command placeholders
- read file argument
- argument detection (file, algorithm)
- non-existent
- is a dir
- is binary
- verify file
- read file
- count lines in file
- verify file: binary ok
- read algorithm flag
- implement 3 flags
- get from build
- implement
- subcommands
- Unit tests
- Integrate with CircleCI
- Build
- Release
- mimetype identification is deterministic and dependency free but non-exhaustive
Check out CONTRIBUTING.md to learn how to contribute to this project.
This library is licensed under the Apache 2.0 License.