Printing empty spaces in awk command Unicorn Meta Zoo #1: Why another podcast? ...

Mistake in years of experience in resume?

What is the best way to deal with NPC-NPC combat?

What was Apollo 13's "Little Jolt" after MECO?

Additive group of local rings

How to translate "red flag" into Spanish?

Why did C use the -> operator instead of reusing the . operator?

What is the ongoing value of the Kanban board to the developers as opposed to management

As an international instructor, should I openly talk about my accent?

A faster way to compute the largest prime factor

How long after the last departure shall the airport stay open for an emergency return?

Suing a Police Officer Instead of the Police Department

How to get even lighting when using flash for group photos near wall?

Arriving in Atlanta after US Preclearance in Dublin. Will I go through TSA security in Atlanta to transfer to a connecting flight?

Check if a string is entirely made of the same substring

Multiple fireplaces in an apartment building?

All ASCII characters with a given bit count

Justification for leaving new position after a short time

Trumpet valves, lengths, and pitch

How to not starve gigantic beasts

I preordered a game on my Xbox while on the home screen of my friend's account. Which of us owns the game?

What is this word supposed to be?

Is it acceptable to use working hours to read general interest books?

Expansion//Explosion and Siren Stormtamer

Why do games have consumables?



Printing empty spaces in awk command



Unicorn Meta Zoo #1: Why another podcast?
Announcing the arrival of Valued Associate #679: Cesar Manara
2019 Community Moderator Election Results
Why I closed the “Why is Kali so hard” questionHow can I turn ugly output into pretty, useful information?Filter output of command by colorUsing sed to align text starting from pattern to end of linetext processingcompare two files and fetch dataExtract specific columns from text fileawk extract lines that both patterns matched are trueHow do I remove newline character from lines preceding a particular pattern?How to convert pdf to an open text format in a fast way?Wanted to know the correct way of using sed command by inserting text from one file to another?





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







0















How can we print values under particular heading using awk command and when there is no value it should print blank space.



Can anyone help me on this.










share|improve this question







New contributor




Tej is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
















  • 2





    Please edit your question and add some examples to make it clearer what's your goal. Thanks!

    – finswimmer
    1 hour ago


















0















How can we print values under particular heading using awk command and when there is no value it should print blank space.



Can anyone help me on this.










share|improve this question







New contributor




Tej is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
















  • 2





    Please edit your question and add some examples to make it clearer what's your goal. Thanks!

    – finswimmer
    1 hour ago














0












0








0








How can we print values under particular heading using awk command and when there is no value it should print blank space.



Can anyone help me on this.










share|improve this question







New contributor




Tej is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












How can we print values under particular heading using awk command and when there is no value it should print blank space.



Can anyone help me on this.







text






share|improve this question







New contributor




Tej is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question







New contributor




Tej is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question






New contributor




Tej is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked 1 hour ago









TejTej

1




1




New contributor




Tej is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





Tej is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






Tej is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.








  • 2





    Please edit your question and add some examples to make it clearer what's your goal. Thanks!

    – finswimmer
    1 hour ago














  • 2





    Please edit your question and add some examples to make it clearer what's your goal. Thanks!

    – finswimmer
    1 hour ago








2




2





Please edit your question and add some examples to make it clearer what's your goal. Thanks!

– finswimmer
1 hour ago





Please edit your question and add some examples to make it clearer what's your goal. Thanks!

– finswimmer
1 hour ago










1 Answer
1






active

oldest

votes


















0














You can fill the empty tokens with code like this



awk '{for(i=1;i<=NF;i++) if ($i == "") $i=" "} ' input_file


and add your code to above command to print what you want






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


    }
    });






    Tej is a new contributor. Be nice, and check out our Code of Conduct.










    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f515380%2fprinting-empty-spaces-in-awk-command%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









    0














    You can fill the empty tokens with code like this



    awk '{for(i=1;i<=NF;i++) if ($i == "") $i=" "} ' input_file


    and add your code to above command to print what you want






    share|improve this answer




























      0














      You can fill the empty tokens with code like this



      awk '{for(i=1;i<=NF;i++) if ($i == "") $i=" "} ' input_file


      and add your code to above command to print what you want






      share|improve this answer


























        0












        0








        0







        You can fill the empty tokens with code like this



        awk '{for(i=1;i<=NF;i++) if ($i == "") $i=" "} ' input_file


        and add your code to above command to print what you want






        share|improve this answer













        You can fill the empty tokens with code like this



        awk '{for(i=1;i<=NF;i++) if ($i == "") $i=" "} ' input_file


        and add your code to above command to print what you want







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered 23 mins ago









        Romeo NinovRomeo Ninov

        7,11232129




        7,11232129






















            Tej is a new contributor. Be nice, and check out our Code of Conduct.










            draft saved

            draft discarded


















            Tej is a new contributor. Be nice, and check out our Code of Conduct.













            Tej is a new contributor. Be nice, and check out our Code of Conduct.












            Tej is a new contributor. Be nice, and check out our Code of Conduct.
















            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%2f515380%2fprinting-empty-spaces-in-awk-command%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

            Taj Mahal Inhaltsverzeichnis Aufbau | Geschichte | 350-Jahr-Feier | Heutige Bedeutung | Siehe auch |...

            Baia Sprie Cuprins Etimologie | Istorie | Demografie | Politică și administrație | Arii naturale...

            Nicolae Petrescu-Găină Cuprins Biografie | Opera | In memoriam | Varia | Controverse, incertitudini...