canon-lens/00-logs/get_all_cmds
2016-03-21 19:59:04 +03:00

10 lines
349 B
Bash
Executable File

#!/bin/bash
# get commands list in all files (no args) or in given filelist
[ "$*" = "" ] && LIST="*.dat" || LIST="$*"
function upper(){ echo $1 | tr [:lower:] [:upper:]; }
function hex2dec(){ echo "obase=10;ibase=16; $(upper $1)" | bc -l; }
./proc_historgram ${LIST}| awk '{print $2}' | sort -u| while read x; do echo "$x : $(hex2dec $x)"; done