Changeset 681 in MondoRescue for branches/stable/mondo/mondo/common


Ignore:
Timestamp:
Jun 25, 2006, 4:41:57 AM (18 years ago)
Author:
andree
Message:

Replaced all occurrences of egrep with 'grep -E' and of fgrep with
'grep -F' in mondo.
egrep and fgrep are usually just script wrappers around grep these
days which means additional overhead compared to calling grep with the
relevant option. Also, it appears that egrep and fgrep have been
deprecated by POSIX some time ago.

Location:
branches/stable/mondo/mondo/common
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/stable/mondo/mondo/common/libmondo-archive.c

    r541 r681  
    18971897                log_to_screen("%s...OK", message_to_screen);
    18981898                if (!run_program_and_log_output
    1899                     ("tail -n10 /var/log/mondo-archive.log | fgrep ':-('",
     1899                    ("tail -n10 /var/log/mondo-archive.log | grep -F ':-('",
    19001900                     1)) {
    19011901                    log_to_screen
  • branches/stable/mondo/mondo/common/libmondo-devices.c

    r680 r681  
    525525    return
    526526        !system
    527         ("parted2fdisk -l 2>/dev/null | grep '^/dev/' | egrep -qv '(MS|DOS|FAT|NTFS)'");
     527        ("parted2fdisk -l 2>/dev/null | grep '^/dev/' | grep -Eqv '(MS|DOS|FAT|NTFS)'");
    528528#endif
    529529}
  • branches/stable/mondo/mondo/common/libmondo-fifo.c

    r667 r681  
    242242    paranoid_system("sync");
    243243    sprintf(command,
    244             "ps wwax | fgrep \"%s\" | fgrep -v grep | awk '{print $1;}' | grep -v PID | tr -s '\n' ' ' | awk '{ print $1; }'",
     244            "ps wwax | grep -F \"%s\" | grep -Fv grep | awk '{print $1;}' | grep -v PID | tr -s '\n' ' ' | awk '{ print $1; }'",
    245245            g_sz_call_to_buffer);
    246246    log_msg(2, "kill_buffer() --- command = %s", command);
  • branches/stable/mondo/mondo/common/libmondo-filelist.c

    r676 r681  
    15461546    {
    15471547        sprintf(find_skeleton_marker,
    1548                 "fgrep -v \"%s\" %s > %s.new 2> /dev/null", dir,
     1548                "grep -Fv \"%s\" %s > %s.new 2> /dev/null", dir,
    15491549                g_skeleton_filelist, g_skeleton_filelist);
    15501550//    log_msg(0, "fsm = %s", find_skeleton_marker);
  • branches/stable/mondo/mondo/common/libmondo-files.c

    r662 r681  
    520520    if (i < 0) {
    521521        sprintf(command,
    522                 "tail -n3 %s | fgrep -i \"%c\" | tail -n1 | awk '{print $0;}'",
     522                "tail -n3 %s | grep -Fi \"%c\" | tail -n1 | awk '{print $0;}'",
    523523                filename, '%');
    524524        strcpy(lastline,
Note: See TracChangeset for help on using the changeset viewer.