Skip to content

Instantly share code, notes, and snippets.

View lidq92's full-sized avatar
:octocat:
May not respond to some unimportant and unrelated issues.

李鼎权, Dingquan Li lidq92

:octocat:
May not respond to some unimportant and unrelated issues.
View GitHub Profile
@lidq92
lidq92 / stats.sh
Created April 3, 2017 08:02 — forked from graysky2/stats.sh
find the median value from a i7z log file using awk
#!/bin/bash
# credit for awk magic goes to
# http://stackoverflow.com/questions/6166375/median-of-column-with-awk
[[ -d $XDG_RUNTIME_DIR ]] &&
file=$XDG_RUNTIME_DIR/.tempfile ||
file=/tmp/.tempfile
# check deps
command -v awk >/dev/null 2>&1 || {