всем доброго вечера. т.к. я не девелопер, и в сях разбираюсь не очень хорошо, прошу помощи: имеется программка - root-tail, основное орудие админа :)) в общем, можно заставить эту программку одновременно выводить на экран несколько логов (можно даже разными цветами). Соответственно получаем картинку такого вида: www.1sm.ru/rt-is.png А хотелось бы чтобы было что-то вроде www.1sm.ru/rt-wanted.png а вот код из root-tail.c, отвечающий за эти названия файлов: while (lineinput (current)) { need_update = 1; /* if we're trying to update old partial lines in * place, and the last time this file was updated the * output was partial, and that partial line is not * too close to the top of the screen, then update * that partial line */ if (opt_update && current->lastpartial && current->last) { append_to_existing_line (current->buf, current); current->buf = 0; continue; } /* if all we just read was a newline ending a line that we've already displayed, skip it */ if (current->buf[0] == '\0' && current->lastpartial) { free(current->buf); current->buf = 0; continue; } /* print filename if any, and if last line was from * different file */ if (lastprinted != current) { current->last = 0; if (!opt_nofilename && current->desc[0]) { insert_new_line (xstrdup ("["), current); append_to_existing_line (xstrdup (current->desc), current); append_to_existing_line (xstrdup ("]"), current); } } /* if we're dealing with partial lines, and the last * time we showed the line it wasn't finished ... */ if (!opt_whole && current->lastpartial) { /* if this is the same file we showed last then append to the last line shown */ if (lastprinted == current) append_to_existing_line (current->buf, current); else { /* but if a different file has been shown in the * mean time, make a new line, starting with the * continuation string */ insert_new_line (current->buf, current); current->last->wrapped_left = 1; } } else /* otherwise just make a plain and simple new line */ insert_new_line (current->buf, current); current->buf = 0; lastprinted = current; } }
![](/photos/9330:1891600153.jpg)
![](/img/p.gif)
Ответ на:
комментарий
от eXire
![](/photos/9330:1891600153.jpg)
Ответ на:
комментарий
от gr_buza
![](/img/p.gif)
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.
Похожие темы
- Форум Примитивный скрипт проверки обновлений для debian (2010)
- Форум Nero 2.0.0.5 (2006)
- Форум Дебианкапец грядёт (2014)
- Форум [lkml] [возможно баян] [arm вперде] Очередной наброс от Торвальдса. (2011)
- Форум Причина закрытия раздела «NVIDIA Linux» на форуме nvnews.net (2012)
- Форум Hello from Google (2012)
- Форум [велосипеды] SliTaz (2011)
- Форум exquilla станет платным плагином. (2019)
- Форум Эпичная утечка памяти в xorg (ubuntu 10.04) и поддержка linux клиентом steam (2010)
- Форум Успей обновить систему за 15 минут (2014)