CSH and all output (with errors) to file












1















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.










share|improve this question
















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 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? 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













  • 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
















1















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.










share|improve this question
















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 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? 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













  • 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














1












1








1








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.










share|improve this question
















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






share|improve this question















share|improve this question













share|improve this question




share|improve this question








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 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? 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













  • 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



















  • 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? 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













  • 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

















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










2 Answers
2






active

oldest

votes


















0














Have you tried makeall |& tee out? This should still print everything on screen, but also in the file out.






share|improve this answer


























  • | 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





















0














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.






share|improve this answer























    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
    });


    }
    });














    draft saved

    draft discarded


















    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









    0














    Have you tried makeall |& tee out? This should still print everything on screen, but also in the file out.






    share|improve this answer


























    • | 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


















    0














    Have you tried makeall |& tee out? This should still print everything on screen, but also in the file out.






    share|improve this answer


























    • | 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
















    0












    0








    0







    Have you tried makeall |& tee out? This should still print everything on screen, but also in the file out.






    share|improve this answer















    Have you tried makeall |& tee out? This should still print everything on screen, but also in the file out.







    share|improve this answer














    share|improve this answer



    share|improve this answer








    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





















    • | 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















    0














    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.






    share|improve this answer




























      0














      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.






      share|improve this answer


























        0












        0








        0







        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.






        share|improve this answer













        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.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Mar 27 '15 at 12:02









        roaimaroaima

        45.6k758124




        45.6k758124






























            draft saved

            draft discarded




















































            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.




            draft saved


            draft discarded














            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





















































            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







            Popular posts from this blog

            Accessing regular linux commands in Huawei's Dopra Linux

            Can't connect RFCOMM socket: Host is down

            Kernel panic - not syncing: Fatal Exception in Interrupt