Как именно Grub Stage1 получает доступ / загружает этап 2? [дубликат]

Pythonsolución (con argumento dinámico intervalo de tiempo ):

tailing_by_time.pyguión:

import time, sys

t_gap = int(sys.argv[1])    # time gap argument
ts = 0
while True:
    line = sys.stdin.readline().strip()    # get/read current line from stdin
    curr_ts = time.time()                  # get current timestamp
    if ts and curr_ts - ts >= t_gap:
        print("")                          # print empty line/newline
    ts = curr_ts
    if line:
        print(line)                        # print current line if it's not empty

Uso:

tail -f error.log | python tailing_by_time.py 3
12
02.02.2016, 12:51
0 ответов

Теги

Похожие вопросы