Ignore:
Timestamp:
Jun 25, 2006, 3:56:38 AM (18 years ago)
Author:
andree
Message:

Replace occurrences of 'grep -v ... | grep -v ... | ...' with 'grep -Ev
...' for efficiency reasons and to ease trouble-shooting.

This also fixes Debian bug #222052.

File:
1 edited

Legend:

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

    r541 r680  
    25232523    strcpy(tmp,
    25242524           call_program_and_get_last_line_of_output
    2525            ("df -m -P -t nonfs,msdosfs,ntfs,smbfs,smb,cifs | tr -s '\t' ' ' | grep -v none | grep -v Filesystem | awk '{printf \"%s %s\\n\", $4, $6;}' | sort -n | tail -n1 | awk '{print $NF;}'"));
     2525           ("df -m -P -t nonfs,msdosfs,ntfs,smbfs,smb,cifs | tr -s '\t' ' ' | grep -vE \"none|Filesystem\" | awk '{printf \"%s %s\\n\", $4, $6;}' | sort -n | tail -n1 | awk '{print $NF;}'"));
    25262526#else
    25272527    strcpy(tmp,
    25282528           call_program_and_get_last_line_of_output
    2529            ("df -m -P -x nfs -x vfat -x ntfs -x smbfs -x smb -x cifs | sed 's/                  /devdev/' | tr -s '\t' ' ' | grep -v none | grep -v Filesystem | grep -v /dev/shm | awk '{printf \"%s %s\\n\", $4, $6;}' | sort -n | tail -n1 | awk '{print $NF;}'"));
     2529           ("df -m -P -x nfs -x vfat -x ntfs -x smbfs -x smb -x cifs | sed 's/                  /devdev/' | tr -s '\t' ' ' | grep -vE \"none|Filesystem|/dev/shm\" | awk '{printf \"%s %s\\n\", $4, $6;}' | sort -n | tail -n1 | awk '{print $NF;}'"));
    25302530#endif
    25312531
Note: See TracChangeset for help on using the changeset viewer.