Ignore:
Timestamp:
Nov 1, 2006, 7:46:51 PM (17 years ago)
Author:
Bruno Cornec
Message:
Further removal of all instances of grep -wx in code.
File:
1 edited

Legend:

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

    r909 r911  
    625625    strcpy(tmp,
    626626           call_program_and_get_last_line_of_output
    627            ("free | grep \":\" | tr -s ' ' '\t' | cut -f2 | head -n1"));
     627           ("free | grep ':' | tr -s ' ' '\t' | cut -f2 | head -n1"));
    628628    avm += atol(tmp);
    629629    sprintf(command, "mount /dev/shm -t tmpfs %s -o size=%d%c",
     
    13961396    log_msg(4, "Done. Great. Seeting command to something");
    13971397    strcpy(command,
    1398            "grep -v \":\" /etc/fstab | grep -vx \"#.*\" | grep -E \"[   ]/boot[     ]\" | tr -s ' ' '\t' | cut -f1 | head -n1");
     1398           "grep -v \":\" /etc/fstab | grep -vE '^#.*$' | grep -E \"[   ]/boot[     ]\" | tr -s ' ' '\t' | cut -f1 | head -n1");
    13991399    log_msg(4, "Cool. Command = '%s'", command);
    14001400    strcpy(tmp, call_program_and_get_last_line_of_output(command));
     
    14101410            }
    14111411        } else {
    1412             sprintf(command, "mount | grep -E \"^%s\"", tmp);
     1412            sprintf(command, "mount | grep -E '^%s'", tmp);
    14131413            log_msg(3, "command = %s", command);
    14141414            if (run_program_and_log_output(command, 5)) {
     
    14861486           ("mktemp -q /tmp/mojo-jojo.blah.XXXXXX"));
    14871487    if (does_file_exist(config_file)) {
    1488         sprintf(command, "grep -vx '%s .*' %s > %s",
     1488        sprintf(command, "grep -vE '^%s .*$' %s > %s",
    14891489                label, config_file, tempfile);
    14901490        paranoid_system(command);
Note: See TracChangeset for help on using the changeset viewer.