When piping to xxd, why is some text passed through without modification?











up vote
0
down vote

favorite












netstat  -lntup |grep  3306  
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN


mysqld is running,the first two lines is a prompt ,you would have to be root to see it all.



netstat  -lntup |grep  3306  |xxd
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
00000000: 7463 7020 2020 2020 2020 2030 2020 2020 tcp 0
00000010: 2020 3020 3132 372e 302e 302e 313a 3333 0 127.0.0.1:33
00000020: 3036 2020 2020 2020 2020 2020 302e 302e 06 0.0.
00000030: 302e 303a 2a20 2020 2020 2020 2020 2020 0.0:*
00000040: 2020 2020 4c49 5354 454e 2020 2020 2020 LISTEN
00000050: 2d20 2020 2020 2020 2020 2020 2020 2020 -
00000060: 2020 2020 0a


Why the first two lines can't be shown as in binary format?

Why only tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN shown as in binary format?
.










share|improve this question
























  • To pipe stdout and stderr together on bash, use |& instead of |...
    – Chris Dodd
    Nov 10 at 1:51















up vote
0
down vote

favorite












netstat  -lntup |grep  3306  
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN


mysqld is running,the first two lines is a prompt ,you would have to be root to see it all.



netstat  -lntup |grep  3306  |xxd
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
00000000: 7463 7020 2020 2020 2020 2030 2020 2020 tcp 0
00000010: 2020 3020 3132 372e 302e 302e 313a 3333 0 127.0.0.1:33
00000020: 3036 2020 2020 2020 2020 2020 302e 302e 06 0.0.
00000030: 302e 303a 2a20 2020 2020 2020 2020 2020 0.0:*
00000040: 2020 2020 4c49 5354 454e 2020 2020 2020 LISTEN
00000050: 2d20 2020 2020 2020 2020 2020 2020 2020 -
00000060: 2020 2020 0a


Why the first two lines can't be shown as in binary format?

Why only tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN shown as in binary format?
.










share|improve this question
























  • To pipe stdout and stderr together on bash, use |& instead of |...
    – Chris Dodd
    Nov 10 at 1:51













up vote
0
down vote

favorite









up vote
0
down vote

favorite











netstat  -lntup |grep  3306  
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN


mysqld is running,the first two lines is a prompt ,you would have to be root to see it all.



netstat  -lntup |grep  3306  |xxd
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
00000000: 7463 7020 2020 2020 2020 2030 2020 2020 tcp 0
00000010: 2020 3020 3132 372e 302e 302e 313a 3333 0 127.0.0.1:33
00000020: 3036 2020 2020 2020 2020 2020 302e 302e 06 0.0.
00000030: 302e 303a 2a20 2020 2020 2020 2020 2020 0.0:*
00000040: 2020 2020 4c49 5354 454e 2020 2020 2020 LISTEN
00000050: 2d20 2020 2020 2020 2020 2020 2020 2020 -
00000060: 2020 2020 0a


Why the first two lines can't be shown as in binary format?

Why only tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN shown as in binary format?
.










share|improve this question















netstat  -lntup |grep  3306  
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN


mysqld is running,the first two lines is a prompt ,you would have to be root to see it all.



netstat  -lntup |grep  3306  |xxd
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
00000000: 7463 7020 2020 2020 2020 2030 2020 2020 tcp 0
00000010: 2020 3020 3132 372e 302e 302e 313a 3333 0 127.0.0.1:33
00000020: 3036 2020 2020 2020 2020 2020 302e 302e 06 0.0.
00000030: 302e 303a 2a20 2020 2020 2020 2020 2020 0.0:*
00000040: 2020 2020 4c49 5354 454e 2020 2020 2020 LISTEN
00000050: 2d20 2020 2020 2020 2020 2020 2020 2020 -
00000060: 2020 2020 0a


Why the first two lines can't be shown as in binary format?

Why only tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN shown as in binary format?
.







bash binary xxd






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 10 at 0:18









Charles Duffy

170k24193247




170k24193247










asked Nov 9 at 23:34









scrapy

160217




160217












  • To pipe stdout and stderr together on bash, use |& instead of |...
    – Chris Dodd
    Nov 10 at 1:51


















  • To pipe stdout and stderr together on bash, use |& instead of |...
    – Chris Dodd
    Nov 10 at 1:51
















To pipe stdout and stderr together on bash, use |& instead of |...
– Chris Dodd
Nov 10 at 1:51




To pipe stdout and stderr together on bash, use |& instead of |...
– Chris Dodd
Nov 10 at 1:51












1 Answer
1






active

oldest

votes

















up vote
2
down vote



accepted










The parenthesized text was written to standard error, not standard output, and so is written directly to the terminal, not the pipe for grep to pass on to xxd.






share|improve this answer





















    Your Answer






    StackExchange.ifUsing("editor", function () {
    StackExchange.using("externalEditor", function () {
    StackExchange.using("snippets", function () {
    StackExchange.snippets.init();
    });
    });
    }, "code-snippets");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "1"
    };
    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',
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    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%2fstackoverflow.com%2fquestions%2f53234596%2fwhen-piping-to-xxd-why-is-some-text-passed-through-without-modification%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    2
    down vote



    accepted










    The parenthesized text was written to standard error, not standard output, and so is written directly to the terminal, not the pipe for grep to pass on to xxd.






    share|improve this answer

























      up vote
      2
      down vote



      accepted










      The parenthesized text was written to standard error, not standard output, and so is written directly to the terminal, not the pipe for grep to pass on to xxd.






      share|improve this answer























        up vote
        2
        down vote



        accepted







        up vote
        2
        down vote



        accepted






        The parenthesized text was written to standard error, not standard output, and so is written directly to the terminal, not the pipe for grep to pass on to xxd.






        share|improve this answer












        The parenthesized text was written to standard error, not standard output, and so is written directly to the terminal, not the pipe for grep to pass on to xxd.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 9 at 23:43









        chepner

        240k30229319




        240k30229319






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Stack Overflow!


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





            Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


            Please pay close attention to the following guidance:


            • 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%2fstackoverflow.com%2fquestions%2f53234596%2fwhen-piping-to-xxd-why-is-some-text-passed-through-without-modification%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

            Schultheiß

            Verwaltungsgliederung Dänemarks

            Liste der Kulturdenkmale in Wilsdruff