CSH and all output (with errors) to file
I need save all output from compilation to file. I have many errors "undefined reference" and I want see all of these errors.
I try "makeall >& out", but in file "out" aren't any of error "undefined reference".
I must use CSH to to makeall.
io-redirection csh stderr
bumped to the homepage by Community♦ 2 hours ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
|
show 1 more comment
I need save all output from compilation to file. I have many errors "undefined reference" and I want see all of these errors.
I try "makeall >& out", but in file "out" aren't any of error "undefined reference".
I must use CSH to to makeall.
io-redirection csh stderr
bumped to the homepage by Community♦ 2 hours ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
Works for me. Did you get any output to the screen from yourmakeall >&out
command?
– roaima
Mar 27 '15 at 10:52
Yes. When I try "makeall >& out" I get errors on screen (only errors).
– marcin
Mar 27 '15 at 11:06
Are you sure that you're usingcsh
? Incsh
>&
will redirect both stdout and stderr, but in Bourne shells it will redirect just stderr.
– Martin Tournoij
Mar 27 '15 at 11:11
Hmm, I tryied to make bad main.cpp and I tried to compile it "g++ main.cpp >& out". Errors from this are in out. My $SHELL is /bin/csh. Maybe script makeall do something strange and csh can't redirect some of output to file.
– marcin
Mar 27 '15 at 11:19
Can you add themakeall
script to your question? Or is it either commercially confidential or way too long to do so?
– roaima
Mar 27 '15 at 11:30
|
show 1 more comment
I need save all output from compilation to file. I have many errors "undefined reference" and I want see all of these errors.
I try "makeall >& out", but in file "out" aren't any of error "undefined reference".
I must use CSH to to makeall.
io-redirection csh stderr
I need save all output from compilation to file. I have many errors "undefined reference" and I want see all of these errors.
I try "makeall >& out", but in file "out" aren't any of error "undefined reference".
I must use CSH to to makeall.
io-redirection csh stderr
io-redirection csh stderr
edited Mar 27 '15 at 22:55
Gilles
543k12811001617
543k12811001617
asked Mar 27 '15 at 10:32
marcinmarcin
2016
2016
bumped to the homepage by Community♦ 2 hours ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
bumped to the homepage by Community♦ 2 hours ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
Works for me. Did you get any output to the screen from yourmakeall >&out
command?
– roaima
Mar 27 '15 at 10:52
Yes. When I try "makeall >& out" I get errors on screen (only errors).
– marcin
Mar 27 '15 at 11:06
Are you sure that you're usingcsh
? Incsh
>&
will redirect both stdout and stderr, but in Bourne shells it will redirect just stderr.
– Martin Tournoij
Mar 27 '15 at 11:11
Hmm, I tryied to make bad main.cpp and I tried to compile it "g++ main.cpp >& out". Errors from this are in out. My $SHELL is /bin/csh. Maybe script makeall do something strange and csh can't redirect some of output to file.
– marcin
Mar 27 '15 at 11:19
Can you add themakeall
script to your question? Or is it either commercially confidential or way too long to do so?
– roaima
Mar 27 '15 at 11:30
|
show 1 more comment
Works for me. Did you get any output to the screen from yourmakeall >&out
command?
– roaima
Mar 27 '15 at 10:52
Yes. When I try "makeall >& out" I get errors on screen (only errors).
– marcin
Mar 27 '15 at 11:06
Are you sure that you're usingcsh
? Incsh
>&
will redirect both stdout and stderr, but in Bourne shells it will redirect just stderr.
– Martin Tournoij
Mar 27 '15 at 11:11
Hmm, I tryied to make bad main.cpp and I tried to compile it "g++ main.cpp >& out". Errors from this are in out. My $SHELL is /bin/csh. Maybe script makeall do something strange and csh can't redirect some of output to file.
– marcin
Mar 27 '15 at 11:19
Can you add themakeall
script to your question? Or is it either commercially confidential or way too long to do so?
– roaima
Mar 27 '15 at 11:30
Works for me. Did you get any output to the screen from your
makeall >&out
command?– roaima
Mar 27 '15 at 10:52
Works for me. Did you get any output to the screen from your
makeall >&out
command?– roaima
Mar 27 '15 at 10:52
Yes. When I try "makeall >& out" I get errors on screen (only errors).
– marcin
Mar 27 '15 at 11:06
Yes. When I try "makeall >& out" I get errors on screen (only errors).
– marcin
Mar 27 '15 at 11:06
Are you sure that you're using
csh
? In csh
>&
will redirect both stdout and stderr, but in Bourne shells it will redirect just stderr.– Martin Tournoij
Mar 27 '15 at 11:11
Are you sure that you're using
csh
? In csh
>&
will redirect both stdout and stderr, but in Bourne shells it will redirect just stderr.– Martin Tournoij
Mar 27 '15 at 11:11
Hmm, I tryied to make bad main.cpp and I tried to compile it "g++ main.cpp >& out". Errors from this are in out. My $SHELL is /bin/csh. Maybe script makeall do something strange and csh can't redirect some of output to file.
– marcin
Mar 27 '15 at 11:19
Hmm, I tryied to make bad main.cpp and I tried to compile it "g++ main.cpp >& out". Errors from this are in out. My $SHELL is /bin/csh. Maybe script makeall do something strange and csh can't redirect some of output to file.
– marcin
Mar 27 '15 at 11:19
Can you add the
makeall
script to your question? Or is it either commercially confidential or way too long to do so?– roaima
Mar 27 '15 at 11:30
Can you add the
makeall
script to your question? Or is it either commercially confidential or way too long to do so?– roaima
Mar 27 '15 at 11:30
|
show 1 more comment
2 Answers
2
active
oldest
votes
Have you tried makeall |& tee out
? This should still print everything on screen, but also in the file out
.
|
won't pipe stderr, only stdout. You will need to use|&
to pipe both stdout and stderr.
– Martin Tournoij
Mar 27 '15 at 11:04
add a comment |
From your comments it appears that the obvious solutions are not working. Please could you try this, sh -c 'makeall >out 2>&1'
(you may need to amend the makeall
part to include the full path, or append various flags; just make sure that it's all inside the single quotes).
If it produces an error please provide that here.
If no error but you still don't get your compilation errors in the out file then your makeall
script is almost certainly doing something very strange with the stdout and stderr file descriptors.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
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
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f192863%2fcsh-and-all-output-with-errors-to-file%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
Have you tried makeall |& tee out
? This should still print everything on screen, but also in the file out
.
|
won't pipe stderr, only stdout. You will need to use|&
to pipe both stdout and stderr.
– Martin Tournoij
Mar 27 '15 at 11:04
add a comment |
Have you tried makeall |& tee out
? This should still print everything on screen, but also in the file out
.
|
won't pipe stderr, only stdout. You will need to use|&
to pipe both stdout and stderr.
– Martin Tournoij
Mar 27 '15 at 11:04
add a comment |
Have you tried makeall |& tee out
? This should still print everything on screen, but also in the file out
.
Have you tried makeall |& tee out
? This should still print everything on screen, but also in the file out
.
edited Mar 27 '15 at 11:11
answered Mar 27 '15 at 11:03
Tristan StorchTristan Storch
364
364
|
won't pipe stderr, only stdout. You will need to use|&
to pipe both stdout and stderr.
– Martin Tournoij
Mar 27 '15 at 11:04
add a comment |
|
won't pipe stderr, only stdout. You will need to use|&
to pipe both stdout and stderr.
– Martin Tournoij
Mar 27 '15 at 11:04
|
won't pipe stderr, only stdout. You will need to use |&
to pipe both stdout and stderr.– Martin Tournoij
Mar 27 '15 at 11:04
|
won't pipe stderr, only stdout. You will need to use |&
to pipe both stdout and stderr.– Martin Tournoij
Mar 27 '15 at 11:04
add a comment |
From your comments it appears that the obvious solutions are not working. Please could you try this, sh -c 'makeall >out 2>&1'
(you may need to amend the makeall
part to include the full path, or append various flags; just make sure that it's all inside the single quotes).
If it produces an error please provide that here.
If no error but you still don't get your compilation errors in the out file then your makeall
script is almost certainly doing something very strange with the stdout and stderr file descriptors.
add a comment |
From your comments it appears that the obvious solutions are not working. Please could you try this, sh -c 'makeall >out 2>&1'
(you may need to amend the makeall
part to include the full path, or append various flags; just make sure that it's all inside the single quotes).
If it produces an error please provide that here.
If no error but you still don't get your compilation errors in the out file then your makeall
script is almost certainly doing something very strange with the stdout and stderr file descriptors.
add a comment |
From your comments it appears that the obvious solutions are not working. Please could you try this, sh -c 'makeall >out 2>&1'
(you may need to amend the makeall
part to include the full path, or append various flags; just make sure that it's all inside the single quotes).
If it produces an error please provide that here.
If no error but you still don't get your compilation errors in the out file then your makeall
script is almost certainly doing something very strange with the stdout and stderr file descriptors.
From your comments it appears that the obvious solutions are not working. Please could you try this, sh -c 'makeall >out 2>&1'
(you may need to amend the makeall
part to include the full path, or append various flags; just make sure that it's all inside the single quotes).
If it produces an error please provide that here.
If no error but you still don't get your compilation errors in the out file then your makeall
script is almost certainly doing something very strange with the stdout and stderr file descriptors.
answered Mar 27 '15 at 12:02
roaimaroaima
45.6k758124
45.6k758124
add a comment |
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
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
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f192863%2fcsh-and-all-output-with-errors-to-file%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
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
Required, but never shown
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
Required, but never shown
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
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Works for me. Did you get any output to the screen from your
makeall >&out
command?– roaima
Mar 27 '15 at 10:52
Yes. When I try "makeall >& out" I get errors on screen (only errors).
– marcin
Mar 27 '15 at 11:06
Are you sure that you're using
csh
? Incsh
>&
will redirect both stdout and stderr, but in Bourne shells it will redirect just stderr.– Martin Tournoij
Mar 27 '15 at 11:11
Hmm, I tryied to make bad main.cpp and I tried to compile it "g++ main.cpp >& out". Errors from this are in out. My $SHELL is /bin/csh. Maybe script makeall do something strange and csh can't redirect some of output to file.
– marcin
Mar 27 '15 at 11:19
Can you add the
makeall
script to your question? Or is it either commercially confidential or way too long to do so?– roaima
Mar 27 '15 at 11:30