|
From: | Larry Evans |
Subject: | Re: [Help-bash] Howto get tags into TIMEFORMAT? (was Re: howto redirect time output to perl -pe "chomp; "? |
Date: | Tue, 3 Jan 2017 15:23:53 -0600 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 |
On 01/03/2017 03:14 PM, Chet Ramey wrote:
On 1/3/17 3:09 PM, Larry Evans wrote:for TIMEFORMAT lead to the following: If this variable is not set, Bash acts as if it had the value $'\nreal\t%3lR\nuser\t%3lU\nsys\t%3lS' So, I figured I could use: TIMEFORMAT='\nreal\t%1R'You forgot the leading `$'.
I should have also said I tried that, but got this: make -f time.mk show echo -n "time{">time.out TIMEFORMAT=\nreal\t%1R' { time sleep .22222 ; } 2>&1 | perl -pe "chomp;" >>time.out echo "}time">>time.out /bin/bash: -c: line 1: unexpected EOF while looking for matching `'' /bin/bash: -c: line 4: syntax error: unexpected end of file time.mk:24: recipe for target 'time' failed make: *** [time] Error 1 Compilation exited abnormally with code 2 at Tue Jan 3 15:22:10 I've attached the complete makefile and hope that helps.
time.mk
Description: Text Data
[Prev in Thread] | Current Thread | [Next in Thread] |