Larry Evans
2017-01-03 16:07:21 UTC
I've read and reread:
https://www.gnu.org/software/bash/manual/bash.html#Appending-Standard-Output-and-Standard-Error
https://www.gnu.org/software/bash/manual/bash.html#Pipelines
and tried every permuation I could think of:
--{--cut here--
***@lje-OptiPlex-9020:~$ echo $SHELL
/bin/bash
***@lje-OptiPlex-9020:~$ time 2>time.out
real 0m0.000s
user 0m0.000s
sys 0m0.000s
***@lje-OptiPlex-9020:~$ cat time.out
***@lje-OptiPlex-9020:~$ time > time.out
real 0m0.000s
user 0m0.000s
sys 0m0.000s
***@lje-OptiPlex-9020:~$ cat time.out
***@lje-OptiPlex-9020:~$ time 2> time.out
real 0m0.000s
user 0m0.000s
sys 0m0.000s
***@lje-OptiPlex-9020:~$ cat time.out
***@lje-OptiPlex-9020:~$ time |perl -pe "chomp"
bash: syntax error near unexpected token `|'
***@lje-OptiPlex-9020:~$ time sleep 1|perl -pe "chomp"
real 0m1.003s
user 0m0.004s
sys 0m0.000s
***@lje-OptiPlex-9020:~$ time sleep 1|&perl -pe "chomp">time.out
real 0m1.003s
user 0m0.000s
sys 0m0.004s
***@lje-OptiPlex-9020:~$ cat time.out
***@lje-OptiPlex-9020:~$ time sleep 1|& perl -pe "chomp">time.out
real 0m1.003s
user 0m0.004s
sys 0m0.000s
***@lje-OptiPlex-9020:~$ cat time.out
***@lje-OptiPlex-9020:~$ echo "hello" | perl -pe "chomp">time.out
***@lje-OptiPlex-9020:~$ cat time.out
***@lje-OptiPlex-9020:~$ echo "hello;" | perl -pe "chomp">time.out
***@lje-OptiPlex-9020:~$ cat time.out
hello;***@lje-OptiPlex-9020:~$ echo $SHELL
/bin/bash
***@lje-OptiPlex-9020:~$ echo "hello" | perl -pe "chomp">time.out
***@lje-OptiPlex-9020:~$ cat time.out
***@lje-OptiPlex-902time sleep 2|& perl -pe "chomp">time.out
real 0m2.003s
user 0m0.004s
sys 0m0.000s
***@lje-OptiPlex-9020:~$ cat time.out
***@lje-OptiPlex-9020:~$ TIMEFORMAT='%3R';time sleep 1 &>| perl -pe
"chomp"
bash: syntax error near unexpected token `|'
***@lje-OptiPlex-9020:~$ TIMEFORMAT='%3R';time sleep 1 >| perl -pe
"chomp"
sleep: invalid option -- 'p'
Try 'sleep --help' for more information.
0.001
***@lje-OptiPlex-9020:~$ TIMEFORMAT='%3R';time sleep 1 | perl -pe "chomp"
1.001
***@lje-OptiPlex-9020:~$ TIMEFORMAT='%3R';time sleep 1 | perl -pe
"chomp" > time.out
1.003
***@lje-OptiPlex-9020:~$ cat time.out
***@lje-OptiPlex-9020:~$ TIMEFORMAT='%3R';time sleep 1 |& perl -pe
"chomp" > time.out
1.002
***@lje-OptiPlex-9020:~$ cat time.out
***@lje-OptiPlex-9020:~$
--}--cut here--
Please, how do I get the output from time wittout the newline?
-regards,
Larry
https://www.gnu.org/software/bash/manual/bash.html#Appending-Standard-Output-and-Standard-Error
https://www.gnu.org/software/bash/manual/bash.html#Pipelines
and tried every permuation I could think of:
--{--cut here--
***@lje-OptiPlex-9020:~$ echo $SHELL
/bin/bash
***@lje-OptiPlex-9020:~$ time 2>time.out
real 0m0.000s
user 0m0.000s
sys 0m0.000s
***@lje-OptiPlex-9020:~$ cat time.out
***@lje-OptiPlex-9020:~$ time > time.out
real 0m0.000s
user 0m0.000s
sys 0m0.000s
***@lje-OptiPlex-9020:~$ cat time.out
***@lje-OptiPlex-9020:~$ time 2> time.out
real 0m0.000s
user 0m0.000s
sys 0m0.000s
***@lje-OptiPlex-9020:~$ cat time.out
***@lje-OptiPlex-9020:~$ time |perl -pe "chomp"
bash: syntax error near unexpected token `|'
***@lje-OptiPlex-9020:~$ time sleep 1|perl -pe "chomp"
real 0m1.003s
user 0m0.004s
sys 0m0.000s
***@lje-OptiPlex-9020:~$ time sleep 1|&perl -pe "chomp">time.out
real 0m1.003s
user 0m0.000s
sys 0m0.004s
***@lje-OptiPlex-9020:~$ cat time.out
***@lje-OptiPlex-9020:~$ time sleep 1|& perl -pe "chomp">time.out
real 0m1.003s
user 0m0.004s
sys 0m0.000s
***@lje-OptiPlex-9020:~$ cat time.out
***@lje-OptiPlex-9020:~$ echo "hello" | perl -pe "chomp">time.out
***@lje-OptiPlex-9020:~$ cat time.out
***@lje-OptiPlex-9020:~$ echo "hello;" | perl -pe "chomp">time.out
***@lje-OptiPlex-9020:~$ cat time.out
hello;***@lje-OptiPlex-9020:~$ echo $SHELL
/bin/bash
***@lje-OptiPlex-9020:~$ echo "hello" | perl -pe "chomp">time.out
***@lje-OptiPlex-9020:~$ cat time.out
***@lje-OptiPlex-902time sleep 2|& perl -pe "chomp">time.out
real 0m2.003s
user 0m0.004s
sys 0m0.000s
***@lje-OptiPlex-9020:~$ cat time.out
***@lje-OptiPlex-9020:~$ TIMEFORMAT='%3R';time sleep 1 &>| perl -pe
"chomp"
bash: syntax error near unexpected token `|'
***@lje-OptiPlex-9020:~$ TIMEFORMAT='%3R';time sleep 1 >| perl -pe
"chomp"
sleep: invalid option -- 'p'
Try 'sleep --help' for more information.
0.001
***@lje-OptiPlex-9020:~$ TIMEFORMAT='%3R';time sleep 1 | perl -pe "chomp"
1.001
***@lje-OptiPlex-9020:~$ TIMEFORMAT='%3R';time sleep 1 | perl -pe
"chomp" > time.out
1.003
***@lje-OptiPlex-9020:~$ cat time.out
***@lje-OptiPlex-9020:~$ TIMEFORMAT='%3R';time sleep 1 |& perl -pe
"chomp" > time.out
1.002
***@lje-OptiPlex-9020:~$ cat time.out
***@lje-OptiPlex-9020:~$
--}--cut here--
Please, how do I get the output from time wittout the newline?
-regards,
Larry