Last active
October 27, 2015 10:17
-
-
Save aminamid/c7a70ac9941dda14b854 to your computer and use it in GitHub Desktop.
lg sum
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| cat /vol2/home/bounce/opwv_pac/lg_smpl/log/smtp_smpl_1/smtp_128.stat | sed -E "s/^\t([^\t ]+)(( [^\s]+){0,})\t\s*/\t\1 /; s/ {1,}/ /g;" | sed -E ":a;N;s/\n\t/ /;t a;P;D" | sed -E "s/^(....)(..)(..) (..)(..)(.)..*\) /\1-\2-\3T\4:\5:\60 /; s/[][] ?/ /g;" | |
| for f in $(ls *stats); do cat ${f} | sed -E "s/^\t([^\t ]+)(( [^\s]+){0,})\t\s*/\t\1 /; s/ {1,}/ /g;" | sed -E ":a;N;s/\n\t/ /;t a;P;D" | sed -E "s/^(....)(..)(..) (..)(..)(.)..*\) /\1-\2-\3T\4:\5:\60 /; s/[][] ?/ /g;" > ${f}.csv; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment