sed -r '' file      # -r, --regexp-extended
grep '^$' file.txt
split -l [number] --numeric-suffixes=[from number] --additional-suffix=[suffix] file [prefix]
-l, --lines=NUMBER
-d, --numeric-suffixes[=from number]
| #!/usr/bin/env python | |
| ######################################################### | |
| # I wrote the little script depended on following dictionaries: | |
| # stardict-cced-2.4.2.tar.bz2, stardict-langdao-ec-gb-2.4.2.tar.bz2, | |
| # stardict-ncce-ec-2.4.2.tar.bz2, stardict-xiangya-medical-2.4.2.tar.bz2 | |
| # | |
| # If you want to use other dictionary you will add or remove parts of the code. | |
| # | |
| # Default is designed to remove the record of <Collins Cobuild English Dictionary> | 
| #!/usr/bin/env python2 | |
| # vim: set fileencoding=utf8 | |
| import re, sys, os, random, time, json, urllib2, logging, argparse | |
| from mutagen.id3 import ID3,TRCK,TIT2,TALB,TPE1,APIC,TDRC,COMM,TCOM,TCON,TSST,WXXX,TSRC | |
| from HTMLParser import HTMLParser | |
| parser = HTMLParser() | |
| s = u'\x1b[1;%dm%s\x1b[0m' # terminual color template | |
| ua = 'Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.95 Safari/537.36' | 
| #!/usr/bin/env python2 | |
| # vim: set fileencoding=utf8 | |
| import re, sys, os, random, time, json, logging, argparse, requests, urllib | |
| from mutagen.id3 import ID3,TRCK,TIT2,TALB,TPE1,APIC,TDRC,COMM,TPOS,USLT | |
| from HTMLParser import HTMLParser | |
| parser = HTMLParser() | |
| s = u'\x1b[1;%dm%s\x1b[0m' # terminual color template | 
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| # | |
| # Copyright (c) 2011, lepture.com | |
| # | |
| # Redistribution and use in source and binary forms, with or without | |
| # modification, are permitted provided that the following conditions | |
| # are met: | |
| # | |
| # * Redistributions of source code must retain the above copyright | 
| #!/usr/bin/env python2 | |
| # -*- coding: utf-8 -*- | |
| import os | |
| import sys | |
| import zipfile | |
| print "Processing File " + sys.argv[1] | |
| file=zipfile.ZipFile(sys.argv[1],"r"); | 
| #!/usr/bin/env python2 | |
| # vim: set fileencoding=utf8 | |
| import base64, requests, time, os, sys, argparse, random, subprocess | |
| s = '\x1b[1;%dm%s\x1b[0m' # terminual color template | |
| ############################################################ | |
| # wget exit status | |
| wget_es = { | 
| #!/usr/bin/env python2 | |
| # vim: set fileencoding=utf8 | |
| import re, os | |
| s = u'\x1b[1;%dm%s\x1b[0m' # terminual color template | |
| r = re.compile(r'[^ -~\n]+') | |
| a = [] | |
| print ' --> runing', s % (93, 'http://www.xunlei6.com/2.htm') | |
| f = os.popen("curl -s http://www.xunlei6.com/2.htm | iconv -f gbk -t utf8 | html2text -ascii | grep -E '(迅雷会|白|企)' | sort -u").read() | 
| #!/usr/bin/env python2 | |
| # vim: set fileencoding=utf8 | |
| import os, sys, json, datetime | |
| s = u'\x1b[1;%dm%s\x1b[0m' # terminual color template | |
| types = ('.MKV', '.FLV', '.AVI', '.RMVB', '.MPG', '.WMV', '.RM', '.mkv', '.flv', '.avi', '.rmvb', '.mpg', '.wmv', '.rm') | |
| class compare(object): | |
| def __init__(self, dir_): | |
| self.dir_ = dir_ | 
| #!/usr/bin/env python2 | |
| # vim: set fileencoding=utf8 | |
| import re, StringIO, sys, os, time, json, gzip, urllib2, argparse, select | |
| from HTMLParser import HTMLParser | |
| parser = HTMLParser() | |
| s = u'\x1b[1;%dm%s\x1b[0m' # terminual color template | |
| email = '' # 输入账号后,可以将播放的歌曲记录到 http://www.xiami.com/space/charts-recent/u/{id} |