How to make “xxd” place spaces between the hex values?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
1
down vote

favorite












I am using the following command to read the output of one terminal from another terminal:



xxd -p /dev/pts/0


But there is no spaces between the hex values, for example I get something like this:



61626162


Instead of this:



61 62 61 62






share|improve this question
















  • 1




    How about od -An -vtx1?
    – cuonglm
    Nov 20 '17 at 3:56














up vote
1
down vote

favorite












I am using the following command to read the output of one terminal from another terminal:



xxd -p /dev/pts/0


But there is no spaces between the hex values, for example I get something like this:



61626162


Instead of this:



61 62 61 62






share|improve this question
















  • 1




    How about od -An -vtx1?
    – cuonglm
    Nov 20 '17 at 3:56












up vote
1
down vote

favorite









up vote
1
down vote

favorite











I am using the following command to read the output of one terminal from another terminal:



xxd -p /dev/pts/0


But there is no spaces between the hex values, for example I get something like this:



61626162


Instead of this:



61 62 61 62






share|improve this question












I am using the following command to read the output of one terminal from another terminal:



xxd -p /dev/pts/0


But there is no spaces between the hex values, for example I get something like this:



61626162


Instead of this:



61 62 61 62








share|improve this question











share|improve this question




share|improve this question










asked Nov 20 '17 at 3:36









Tom

286




286







  • 1




    How about od -An -vtx1?
    – cuonglm
    Nov 20 '17 at 3:56












  • 1




    How about od -An -vtx1?
    – cuonglm
    Nov 20 '17 at 3:56







1




1




How about od -An -vtx1?
– cuonglm
Nov 20 '17 at 3:56




How about od -An -vtx1?
– cuonglm
Nov 20 '17 at 3:56










1 Answer
1






active

oldest

votes

















up vote
0
down vote













If you're open to bringing in other tools then one possibility is to send output through sed:



xxd -p /dev/pts/0 | sed 's/../& /g'





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',
    convertImagesToLinks: false,
    noModals: false,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    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%2f405701%2fhow-to-make-xxd-place-spaces-between-the-hex-values%23new-answer', 'question_page');

    );

    Post as a guest






























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    0
    down vote













    If you're open to bringing in other tools then one possibility is to send output through sed:



    xxd -p /dev/pts/0 | sed 's/../& /g'





    share|improve this answer
























      up vote
      0
      down vote













      If you're open to bringing in other tools then one possibility is to send output through sed:



      xxd -p /dev/pts/0 | sed 's/../& /g'





      share|improve this answer






















        up vote
        0
        down vote










        up vote
        0
        down vote









        If you're open to bringing in other tools then one possibility is to send output through sed:



        xxd -p /dev/pts/0 | sed 's/../& /g'





        share|improve this answer












        If you're open to bringing in other tools then one possibility is to send output through sed:



        xxd -p /dev/pts/0 | sed 's/../& /g'






        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 20 '17 at 3:56









        B Layer

        3,9241525




        3,9241525



























             

            draft saved


            draft discarded















































             


            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f405701%2fhow-to-make-xxd-place-spaces-between-the-hex-values%23new-answer', 'question_page');

            );

            Post as a guest













































































            Popular posts from this blog

            How to check contact read email or not when send email to Individual?

            Bahrain

            Postfix configuration issue with fips on centos 7; mailgun relay