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.