Skip to content

Instantly share code, notes, and snippets.

@whywaita
Created May 16, 2014 04:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save whywaita/aaf53bbf52f62511a38e to your computer and use it in GitHub Desktop.
Save whywaita/aaf53bbf52f62511a38e to your computer and use it in GitHub Desktop.
これをcronで1min毎に回すと幸せになるんじゃ
#!/bin/sh
DATE=`date +%Y%m%d`
rm -rf /home/whywaita/ircweb/$DATE.html
cp /home/whywaita/irclog/tkbctf/$DATE.log /home/whywaita/ircweb/
cd /home/whywaita/ircweb/
cat $DATE.log | sed "s/$/<br>/g" > $DATE.tmp
cat $DATE.tmp | sed "1i\<meta charset='utf-8'>" > $DATE.html
chmod 744 $DATE.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment