avoid unportable tail;
authorwenzelm
Wed, 07 Dec 2005 15:23:22 +0100
changeset 18364a716d3b289ed
parent 18363 0040ee0b01c9
child 18365 0839b1ddc29b
avoid unportable tail;
lib/scripts/timestart.bash
     1.1 --- a/lib/scripts/timestart.bash	Wed Dec 07 12:33:38 2005 +0100
     1.2 +++ b/lib/scripts/timestart.bash	Wed Dec 07 15:23:22 2005 +0100
     1.3 @@ -13,7 +13,7 @@
     1.4  function get_times () {
     1.5    local TMP="/tmp/get_times$$"
     1.6    times > "$TMP"   # No pipe here!
     1.7 -  TIMES_RESULT="$SECONDS $(tail -1 "$TMP" | "$AUTO_PERL" -pe 's,(\d+)m(\d+)\.\d+s +(\d+)m(\d+)\.\d+s, $1 * 60 + $2 + $3 * 60 + $4,e')"
     1.8 +  TIMES_RESULT="$SECONDS $(echo $(cat "$TMP") | "$AUTO_PERL" -pe 's,\d+m\d+\.\d+s \d+m\d+\.\d+s (\d+)m(\d+)\.\d+s +(\d+)m(\d+)\.\d+s, $1 * 60 + $2 + $3 * 60 + $4,e')"
     1.9    rm -f "$TMP"
    1.10  }
    1.11