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-files.c

    r234 r273  
    845845    sprintf(mountlist, "%s/mountlist.txt", tmpdir);
    846846    sprintf(command,
    847             "cat %s/mountlist.txt | grep \"%s \" | head -n1 | awk '{print $4;}'",
    848             tmpdir, dev);
     847            "grep \"%s \" %s/mountlist.txt | head -n1 | awk '{print $4}'",
     848            dev, tmpdir);
    849849    log_it(command);
    850850    strcpy(sz_res, call_program_and_get_last_line_of_output(command));
Note: See TracChangeset for help on using the changeset viewer.