?? striplog
字號:
#!/usr/bin/python## striplog -- strip leading lines from logs## striplog -1 strips the first line only.# striplog with no option strips all leading lines beginning with ##import getopt, sysfirstline = False(options, argumwnts) = getopt.getopt(sys.argv[1:], "1")for (switch, val) in options: if (switch == '-1'): firstline = Trueif firstline: sys.stdin.readline()else: while True: line = sys.stdin.readline() if line[0] != '#': break sys.stdout.write(line)sys.stdout.write(sys.stdin.read())
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -