Command line tool that replicates unix cut which is used to cut out the selected portions from each line in a file. Basic solution that answers all the steps as outlined in the project requirements.
-f: prints out the specified field(s) from each line-d: Specify what character to use as the delimiter between fields.
Initialize the project with npm link
Supports the following options:
- Default - use tab for field delimiter
>cccut -f<i> <file>
# print out field i- Delimiter support
>cccut -f1 -d<delimiter> <file>
# use delimiter e.g "," to separate fields- Field List support
>cccut -f<list> <file>
# list is a comma or whitespace separated list of fields, i.e. -f1,2 or -f“1 2”- Able to read from standard input if no filename is specified.
>tail -n5 <file> | cccut -d, -f"1 2"
# prints out the first and second fields from the standard input delimited by ","- Pipeline Support: Able to also send to stdOut to be consumed by another process
>cccut -f2 -d, fourchords.csv | uniq |ccwc -l
# Logs how many unique artists are in the data set.