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 list | awk 'BEGIN{printf "Content-Type: text/html\n\n<!DOCTYPE html>\n<html>\n<head>\n <meta charset=\"utf-8\">\n</head>\n<body>\n<ul>\n"} {print "<li>" $2 "</li>"} END{printf "</ul>\n | |
</body>\n</html>\n"}' |
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
echo 突然のワンライナーEx | awk '{for(i=1;i<=length();i++){len+=(substr($0,i,1)~/[\x01-\x7E]/)?1:2}for(i=0;i<len/2+2;i++){up=up "人";dn=dn "Y^"}printf("_%s_\n> %s <\n ̄%s ̄\n",up,$0,dn)}' |
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
$ echo 突然の死 | awk '{for(i=0;i<length()+2;i++){up=up "人"; dn=dn "Y^"} printf("_%s_\n> %s <\n ̄%s ̄\n", up, $0, dn)}' | |
_人人人人人人_ | |
> 突然の死 < | |
 ̄Y^Y^Y^Y^Y^Y^ ̄ | |
$ |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
############################################################################### | |
# | |
# CloudFront log to Apache log converter | |
# | |
# Copyright (C) 2016 MSR All Rights Reserved. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); |