This file contains 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
(ns day10 | |
(:require [clojure.repl :refer [source apropos dir pst doc find-doc]] | |
[clojure.string :as string])) | |
(def small | |
"[({(<(())[]>[[{[]{<()<>> | |
[(()[<>])]({[<{<<[]>>( | |
{([(<{}[<>[]}>{[]{[(<()> | |
(((({<>}<{<{<>}{[]{[]{} |
This file contains 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
My try in bash abusing cut(1) with grouping by time: | |
for i in $(curl whatever | cut -sd "," -f 1,5,6 | grep -v null | head ) | |
do | |
NAME=$(echo $i | cut -d '"' -f 4) | |
TIME=$(echo $i | cut -d '"' -f 8 | cut -d ' ' -f 1 | tr -d '-') | |
CC=$(echo $i | cut -d '"' -f 12) | |
echo $NAME,$CC > $TIME.csv | |
done |