Sha256: 96aebdadfeab4b8614c5dad797e0e010f3b7b6b7628fd90437fe1aee33755761
Contents?: true
Size: 673 Bytes
Versions: 25
Compression:
Stored size: 673 Bytes
Contents
#!/usr/bin/env bash # # cut 1 # # Example: # # A quickie histogram of timestamps; say that for the object in the foo/bar # directory, field 3 holds a flat timestamp (YYYYmmddHHMMSS) and you want a # histogram by hour (and that foo/bar is small enough to be worth sucking # through a single machine): # # hdp-catd foo/bar | cuttab 3 | cutc 12 | sort | uniq -c # # If foo/bar is already sorted leave out the call to sort. # # # Set it to cut up to $1 (if defined), or if not, up to $CUTC_MAX (if defined), or 200 chars as a fallback. # CUTC_MAX=${CUTC_MAX-200} CUTC_MAX=${1-$CUTC_MAX} cutchars="1-${CUTC_MAX}" shift # # Do the cuttin' # exec cut -c"${cutchars}" "$@"
Version data entries
25 entries across 25 versions & 2 rubygems