gist:c9ae330c678d9e4a02ba
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
#!/dis/sh | |
load std regex | |
drx = '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]' | |
cfn = `{ls tw-days|sort -r|sed 1q} | |
dn = `{basename $cfn .log} | |
echo -n > $cfn | |
sed -n ( | |
'/^! day changed, ' ^ $dn ^ '/,$ { s/�//g; s/$/\n/; p; }' | |
'./#twitter_1337p337.log' ) | | |
grep -v '^#' | | |
uniq | | |
fmt -l80 | | |
getlines { | |
and {match '^! day changed, ' ^ $drx $line} { | |
cfn = tw-days/ ^ ${re m $drx $line} ^ .log | |
echo $line | |
} | |
echo $line >> $cfn | |
} |