by version_five · 5y ago · 0 comments
data source | processing | plot
E.g. a csv, cut or awk, then either print the data or plot. The features I suggested make this workflow easier, but I don't know how common that is. I'd be interested to know how other people would use this.To answer your question, I mainly use this for counting lines of code:
cloc --by-file --csv src/ | awk -F, '/^C/{print$5,$2}' | barchart | less
(The above pipeline counts the lines of C code in files in the src directory.)EDIT: Actually, the script can pretty easily support alternative delimiters. Let's say you wanted "," as a delimiter. Instead of writing:
barchart data
Just write: sed 's/,/ /' data | barchart
(This sed invocation will only replace the first comma, so it won't mess with your labels.)