Changeset 346


Ignore:
Timestamp:
Jan 25, 2006, 3:43:55 PM (14 years ago)
Author:
bcornec
Message:

Fix a bug in LVM context for RHEL4 where non integer numbers were returned by GetValueFromField? instead of integers. (patch from remi.bondoin_at_regis-dgac.net)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/stable/mindi/analyze-my-lvm

    r299 r346  
    4444GetValueFromField() {
    4545    local res
    46     sed s/'    '/~/ "$1" | tr -s ' ' ' ' | sed s/'~ '/'~'/ | grep -i "$2~" | cut -d'~' -f2,3,4,5 | tr '~' ' ' | gawk '{ if ($2=="MB") {printf "%sm",$1;} else if ($2=="KB") {printf "%sk",$1;} else if ($2=="GB") {printf "%sg",$1;} else {print $0;};}'
     46    sed s/'    '/~/ "$1" | tr -s ' ' ' ' | sed s/'~ '/'~'/ | grep -i "$2~" | cut -d'~' -f2,3,4,5 | tr '~' ' ' | gawk '{ if ($2=="MB") {printf "%dm",$1;} else if ($2=="KB") {printf "%dk",$1;} else if ($2=="GB") {printf "%dg",$1;} else {print $0;};}'
    4747}
    4848
Note: See TracChangeset for help on using the changeset viewer.