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/common/libmondo-filelist.c

    r128 r273  
    656656  if (find_home_of_exe("setfacl"))
    657657    {
    658       sprintf(command, "cat %s | gzip -dc | setfacl --restore - 2>> %s", acl_fname, MONDO_LOGFILE);
     658      sprintf(command, "gzip -dc %s | setfacl --restore - 2>> %s", acl_fname, MONDO_LOGFILE);
    659659      log_msg(1, "command = %s", command);
    660660      retval = system(command);
     
    685685        log_msg(1,
    686686                "No masklist provided. I shall therefore set ALL attributes.");
    687         sprintf(command, "cat %s | gzip -dc | %s --restore - 2>> %s",
     687        sprintf(command, "gzip -dc %s | %s --restore - 2>> %s",
    688688                original_exat_fname, executable, MONDO_LOGFILE);
    689689        log_msg(1, "command = %s", command);
     
    712712    sort_file(masklist);
    713713    current_subset_file[0] = current_master_file[0] = '\0';
    714     sprintf(syscall_pin, "cat %s | gzip -dc", original_exat_fname);
     714    sprintf(syscall_pin, "gzip -dc %s", original_exat_fname);
    715715    sprintf(syscall_pout, "%s --restore - 2>> %s", executable,
    716716            MONDO_LOGFILE);
     
    833833  if (find_home_of_exe("setfattr"))
    834834    {
    835       sprintf(command, "cat %s | gzip -dc | setfattr --restore - 2>> %s", acl_fname, MONDO_LOGFILE);
     835      sprintf(command, "gzip -dc %s | setfattr --restore - 2>> %s", acl_fname, MONDO_LOGFILE);
    836836      log_msg(1, "command = %s", command);
    837837      retval = system(command);
Note: See TracChangeset for help on using the changeset viewer.