Changeset 681 in MondoRescue for branches/stable


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
Files:
8 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,
  • branches/stable/mondo/mondo/mondoarchive/mondo-cli.c

    r633 r681  
    920920        &&
    921921        !run_program_and_log_output
    922         ("egrep -i suse /etc/issue.net | egrep '9.0' | grep 64", TRUE)) {
     922        ("grep -Ei suse /etc/issue.net | grep -E '9.0' | grep 64", TRUE)) {
    923923        bkpinfo->make_cd_use_lilo = TRUE;
    924924        log_to_screen
  • branches/stable/mondo/mondo/mondorestore/mondo-prep.c

    r558 r681  
    18191819        log_msg(0,
    18201820                "------------------- end of fdisk.log... word! ------------------");
    1821         sprintf(tmp, "tail -n6 %s | fgrep \"16: \"", FDISK_LOG);
     1821        sprintf(tmp, "tail -n6 %s | grep -F \"16: \"", FDISK_LOG);
    18221822        if (!run_program_and_log_output(tmp, 5)) {
    18231823            g_partition_table_locked_up++;
  • branches/stable/mondo/mondo/mondorestore/mondo-rstr-tools.c

    r558 r681  
    720720    }
    721721
    722     if (!run_program_and_log_output("mount | fgrep " MNT_CDROM, FALSE)) {
     722    if (!run_program_and_log_output("mount | grep -F " MNT_CDROM, FALSE)) {
    723723        log_msg(2, "mount_cdrom() - CD already mounted. Fair enough.");
    724724        paranoid_free(mount_cmd);
Note: See TracChangeset for help on using the changeset viewer.