chc

command module
v0.0.0-...-946fa7d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 28, 2024 License: MIT Imports: 11 Imported by: 0

README

chc - Character Count

chc returns a sorted list of the most common characters in a file or directory. If given a directory, it walks all subdirectories recursively.

Example

Running on this repository, reading only go files and counting only special characters, gives:

$ chc -i='[^a-zA-Z0-9\s]' -f='.*\.go' .
" 76
) 70
( 70
. 62
, 54
} 40
{ 40
: 38
= 35
] 18
\ 18
[ 18
* 12
! 12
% 10
' 6
& 5
_ 3
; 3
/ 3
> 2
+ 2
< 1

Usage

Usage of chc:
  -f string
        filter files to read (regex) (default ".*")
  -i string
        characters to include (regex) (default ".*")
  -v    enable verbose output

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL