Ignore:
Timestamp:
Jan 3, 2006, 4:09:12 PM (18 years ago)
Author:
bcornec
Message:

Patches from Sébastien Aperghis-Tramoni <maddingue@…>

replace several occurences of "cat .. | grep .."
or with similar commands that accept filenames as arguments.
+ some sort | uniq replaced by sort -u

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.06/mondo/mondo/mondorestore/mondo-rstr-tools.c

    r253 r273  
    400400            f, file);
    401401    log_msg(2, tmp);
    402     sprintf(command, "cat %s | grep -x \"%s\"", list_fname, file);
     402    sprintf(command, "grep -x \"%s\" %s", file, list_fname);
    403403    res = run_program_and_log_output(command, FALSE);
    404404    paranoid_free(command);
     
    558558    }
    559559    sprintf(newfile_fname, "%s/rc.local.mondorescue", path);
    560     sprintf(tmp, "cat %s | grep mondorescue > /dev/null 2> /dev/null",
     560    sprintf(tmp, "grep mondorescue %s > /dev/null 2> /dev/null",
    561561            rclocal_fname);
    562562    if (system(tmp)) {
     
    569569\\n\
    570570\\n\
    571 cat %s | grep -v mondorescue > %s\\n\
     571grep -v mondorescue %s > %s\\n\
    572572rm -f /var/lock/subsys/*xfs*\\n\
    573573rm -f /var/run/xfs.*\\n\
     
    13711371            paranoid_system(command);
    13721372        }
    1373         sprintf(command, "cat %s | grep  -x \"/dev/.*\" > %s",
     1373        sprintf(command, "grep  -x \"/dev/.*\" %s > %s",
    13741374                g_biggielist_txt, g_filelist_imagedevs);
    13751375        paranoid_system(command);
Note: See TracChangeset for help on using the changeset viewer.