Makefile cppUtest output reformat
Clash Royale CLAN TAG#URR8PPP
up vote
1
down vote
favorite
I need to reformat the output of a program created with cppUtest during my build from inside a makefile.
I have this target in my Makefile:
.PHONY: runalltests
runalltests: ##@tests Run all tests.
$(ECHO)
@./runAlltests
That executes the 'runalltests' program which outputs this text into terminal. (The dots are important)
......
OK (6 tests, 6 ran, 7 checks, 0 ignored, 0 filtered out, 0 ms)
I know from other answers in the stack overflow site that I need awk, sed or grep (or something I do not know of). But I can not figure it out for a long time now on how to do it so I gave up trying and ask here.
I want to reformat the output into adding 4 spaces before each line.
For example this:
(Four spaces here)......
(Four spaces here)OK (6 tests, 6 ran, 7 checks, 0 ignored, 0 filtered out, 0 ms)
shell awk sed grep make
add a comment |Â
up vote
1
down vote
favorite
I need to reformat the output of a program created with cppUtest during my build from inside a makefile.
I have this target in my Makefile:
.PHONY: runalltests
runalltests: ##@tests Run all tests.
$(ECHO)
@./runAlltests
That executes the 'runalltests' program which outputs this text into terminal. (The dots are important)
......
OK (6 tests, 6 ran, 7 checks, 0 ignored, 0 filtered out, 0 ms)
I know from other answers in the stack overflow site that I need awk, sed or grep (or something I do not know of). But I can not figure it out for a long time now on how to do it so I gave up trying and ask here.
I want to reformat the output into adding 4 spaces before each line.
For example this:
(Four spaces here)......
(Four spaces here)OK (6 tests, 6 ran, 7 checks, 0 ignored, 0 filtered out, 0 ms)
shell awk sed grep make
add a comment |Â
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I need to reformat the output of a program created with cppUtest during my build from inside a makefile.
I have this target in my Makefile:
.PHONY: runalltests
runalltests: ##@tests Run all tests.
$(ECHO)
@./runAlltests
That executes the 'runalltests' program which outputs this text into terminal. (The dots are important)
......
OK (6 tests, 6 ran, 7 checks, 0 ignored, 0 filtered out, 0 ms)
I know from other answers in the stack overflow site that I need awk, sed or grep (or something I do not know of). But I can not figure it out for a long time now on how to do it so I gave up trying and ask here.
I want to reformat the output into adding 4 spaces before each line.
For example this:
(Four spaces here)......
(Four spaces here)OK (6 tests, 6 ran, 7 checks, 0 ignored, 0 filtered out, 0 ms)
shell awk sed grep make
I need to reformat the output of a program created with cppUtest during my build from inside a makefile.
I have this target in my Makefile:
.PHONY: runalltests
runalltests: ##@tests Run all tests.
$(ECHO)
@./runAlltests
That executes the 'runalltests' program which outputs this text into terminal. (The dots are important)
......
OK (6 tests, 6 ran, 7 checks, 0 ignored, 0 filtered out, 0 ms)
I know from other answers in the stack overflow site that I need awk, sed or grep (or something I do not know of). But I can not figure it out for a long time now on how to do it so I gave up trying and ask here.
I want to reformat the output into adding 4 spaces before each line.
For example this:
(Four spaces here)......
(Four spaces here)OK (6 tests, 6 ran, 7 checks, 0 ignored, 0 filtered out, 0 ms)
shell awk sed grep make
edited Dec 13 '17 at 16:31
asked Dec 13 '17 at 16:19
Tedi
84
84
add a comment |Â
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
1
down vote
accepted
Simply with sed
:
<runalltests_output> | sed 's/^/ /'
@Tedi, you're welcome
â RomanPerekhrest
Dec 13 '17 at 18:14
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
accepted
Simply with sed
:
<runalltests_output> | sed 's/^/ /'
@Tedi, you're welcome
â RomanPerekhrest
Dec 13 '17 at 18:14
add a comment |Â
up vote
1
down vote
accepted
Simply with sed
:
<runalltests_output> | sed 's/^/ /'
@Tedi, you're welcome
â RomanPerekhrest
Dec 13 '17 at 18:14
add a comment |Â
up vote
1
down vote
accepted
up vote
1
down vote
accepted
Simply with sed
:
<runalltests_output> | sed 's/^/ /'
Simply with sed
:
<runalltests_output> | sed 's/^/ /'
answered Dec 13 '17 at 17:25
RomanPerekhrest
22.4k12145
22.4k12145
@Tedi, you're welcome
â RomanPerekhrest
Dec 13 '17 at 18:14
add a comment |Â
@Tedi, you're welcome
â RomanPerekhrest
Dec 13 '17 at 18:14
@Tedi, you're welcome
â RomanPerekhrest
Dec 13 '17 at 18:14
@Tedi, you're welcome
â RomanPerekhrest
Dec 13 '17 at 18:14
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f410687%2fmakefile-cpputest-output-reformat%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password