Ignore:
Timestamp:
Nov 19, 2005, 1:53:52 AM (18 years ago)
Author:
bcornec
Message:

This patch avoids useless invocations of `cat <file> |' where the second
process in the pipe can more efficiently read its input file itself.
It replaces also some grep'+sed' commands by an unique `sed' command.
This patch also improves readability of shell commands by
replacing \" by ' where possible.
This patch instructs mondo to say DVD' instead of CD' when appropriate.
This patch forces growisofs to use speed=1 for DVD burning. In my
experience, DVD burning time is only a small part of the total backup
time so this should not make a big difference in backup time, but
a big one in reliability of mondo. On my installation, without
the option `speed=1', mondo/growisofs is unable to burn a DVD. With
the option `speed=1', mondo works.
(Philippe De Muyter)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.05/mondo/mondo/common/newt-specific.c

    r99 r126  
    562562  if (grep_for_me[0] != '\0')
    563563    {
    564       sprintf (command, "cat %s | grep \"%s\" | tail -n%d", filename,
    565            grep_for_me, g_noof_log_lines);
    566     }
    567   else
    568     {
    569       sprintf (command, "cat %s | tail -n%d", filename, g_noof_log_lines);
     564      sprintf (command, "grep '%s' %s | tail -n%d",           
     565                    grep_for_me, filename,
     566                    g_noof_log_lines);
     567    }
     568  else
     569    {
     570      sprintf (command, "cat %s | tail -n%d %s", g_noof_log_lines, filename);
    570571    }
    571572  fin = popen (command, "r");
Note: See TracChangeset for help on using the changeset viewer.