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

Version Path
ul-wukong-4.1.1 bin/cutc
ul-wukong-4.1.0 bin/cutc
wukong-4.0.0 bin/cutc
wukong-3.0.1 bin/cutc
wukong-3.0.0 bin/cutc
wukong-3.0.0.pre3 bin/cutc
wukong-3.0.0.pre2 bin/cutc
wukong-3.0.0.pre bin/cutc
wukong-2.0.2 bin/cutc
wukong-2.0.1 bin/cutc
wukong-2.0.0 bin/cutc
wukong-1.5.4 bin/cutc
wukong-1.5.3 bin/cutc
wukong-1.5.2 bin/cutc
wukong-1.5.1 bin/cutc
wukong-1.5.0 bin/cutc
wukong-1.4.12 bin/cutc
wukong-1.4.11 bin/cutc
wukong-1.4.10 bin/cutc
wukong-1.4.9 bin/cutc