Write to a file, where the output is tabbed instead of spaced











up vote
0
down vote

favorite












I'm working on a program that records students grades. The user inputs first name, last name, student ID, grade, and assignment name. I'm supposed to have the input from the user separated by being tabbed rather than a space. But when I execute the program the output in the txt file isn't correct.



#include <stdio.h>

int main(void){

FILE *cfPtr; // cfPtr = clients.txt file pointer

// fopen opens file. Exit program if unable to create file
if ((cfPtr = fopen("grades.txt", "w")) == NULL) {
puts("File could not be opened.");
}
else {
puts("Enter the students first & last name, ID, grade, and assignment.");

puts("Enter EOF to end input.");
printf("%s", "? ");

char firstName[30]; // student first name
char lastName[30]; // student last name
unsigned int stuID; // student ID
double grade; // student grade
char assignment[10]; // student assignment name

scanf("%5s%5s%d%lf%5s", firstName, lastName, &stuID, &grade, assignment);

// write first & last name, student ID, grade, and assignment name into file with fprintf

while(!feof(stdin)) {
fprintf(cfPtr, "%st%st%dt%.2ft%stn", firstName, lastName, stuID, grade, assignment);
fflush(cfPtr);
printf("%s", "? ");
scanf("%5s%5s%d%lf%5s", firstName, lastName, &stuID, &grade, assignment);
} // end while

fclose(cfPtr); // fclose closes file
} // end else
} // end main


Heres what happens when I execute it:



Enter the students first & last name, ID, grade, and assignment.



Enter EOF to end input.



? Freddy Krueger 1234 22.33 test1



? ? Jason Vorhees 1235 33.00 test1



? ? The Hulk 1236 2.95 test1



? Bat Man 1237 100.00 test1



? ^Z



[1]+ Stopped ./seqw





grade.txt file output:



Fredd y 0 0.00 ttime



Krueg er 1234 22.33 test1



Jason Vorhe 1234 22.33 test1



es 1235 33 0.00 test1



The Hulk 1236 2.95 test1



Bat Man 1237 100.00 test1



What am I doing wrong here? And where did ttime come from? And it's strange how it's tabbing part of the last name and making it another input.










share|improve this question






















  • I would start by checking what scanf is returning. If you didn't scan the right number of items you should stop there. You should also test your input for when yo stop, not after the fact with !feof. stackoverflow.com/questions/5431941/…
    – Retired Ninja
    Nov 19 at 23:01








  • 3




    Why are you restricting the string inputs to 5 characters? What do you think happens to the rest of the truncated strings?
    – Weather Vane
    Nov 19 at 23:06






  • 1




    You have 30-character variables, but only scan 5 characters
    – stark
    Nov 19 at 23:11






  • 2




    Please see Why is while ( !feof (file) ) always wrong?. You should always check the return value from scanf function family, and an idiomatic way to deal with both problems is while (scanf(...) == 5) { ... }
    – Weather Vane
    Nov 19 at 23:11










  • Your scanf statement should look like scanf("%30s%30s%u%d%10s", ...).
    – eapetcho
    Nov 20 at 4:13















up vote
0
down vote

favorite












I'm working on a program that records students grades. The user inputs first name, last name, student ID, grade, and assignment name. I'm supposed to have the input from the user separated by being tabbed rather than a space. But when I execute the program the output in the txt file isn't correct.



#include <stdio.h>

int main(void){

FILE *cfPtr; // cfPtr = clients.txt file pointer

// fopen opens file. Exit program if unable to create file
if ((cfPtr = fopen("grades.txt", "w")) == NULL) {
puts("File could not be opened.");
}
else {
puts("Enter the students first & last name, ID, grade, and assignment.");

puts("Enter EOF to end input.");
printf("%s", "? ");

char firstName[30]; // student first name
char lastName[30]; // student last name
unsigned int stuID; // student ID
double grade; // student grade
char assignment[10]; // student assignment name

scanf("%5s%5s%d%lf%5s", firstName, lastName, &stuID, &grade, assignment);

// write first & last name, student ID, grade, and assignment name into file with fprintf

while(!feof(stdin)) {
fprintf(cfPtr, "%st%st%dt%.2ft%stn", firstName, lastName, stuID, grade, assignment);
fflush(cfPtr);
printf("%s", "? ");
scanf("%5s%5s%d%lf%5s", firstName, lastName, &stuID, &grade, assignment);
} // end while

fclose(cfPtr); // fclose closes file
} // end else
} // end main


Heres what happens when I execute it:



Enter the students first & last name, ID, grade, and assignment.



Enter EOF to end input.



? Freddy Krueger 1234 22.33 test1



? ? Jason Vorhees 1235 33.00 test1



? ? The Hulk 1236 2.95 test1



? Bat Man 1237 100.00 test1



? ^Z



[1]+ Stopped ./seqw





grade.txt file output:



Fredd y 0 0.00 ttime



Krueg er 1234 22.33 test1



Jason Vorhe 1234 22.33 test1



es 1235 33 0.00 test1



The Hulk 1236 2.95 test1



Bat Man 1237 100.00 test1



What am I doing wrong here? And where did ttime come from? And it's strange how it's tabbing part of the last name and making it another input.










share|improve this question






















  • I would start by checking what scanf is returning. If you didn't scan the right number of items you should stop there. You should also test your input for when yo stop, not after the fact with !feof. stackoverflow.com/questions/5431941/…
    – Retired Ninja
    Nov 19 at 23:01








  • 3




    Why are you restricting the string inputs to 5 characters? What do you think happens to the rest of the truncated strings?
    – Weather Vane
    Nov 19 at 23:06






  • 1




    You have 30-character variables, but only scan 5 characters
    – stark
    Nov 19 at 23:11






  • 2




    Please see Why is while ( !feof (file) ) always wrong?. You should always check the return value from scanf function family, and an idiomatic way to deal with both problems is while (scanf(...) == 5) { ... }
    – Weather Vane
    Nov 19 at 23:11










  • Your scanf statement should look like scanf("%30s%30s%u%d%10s", ...).
    – eapetcho
    Nov 20 at 4:13













up vote
0
down vote

favorite









up vote
0
down vote

favorite











I'm working on a program that records students grades. The user inputs first name, last name, student ID, grade, and assignment name. I'm supposed to have the input from the user separated by being tabbed rather than a space. But when I execute the program the output in the txt file isn't correct.



#include <stdio.h>

int main(void){

FILE *cfPtr; // cfPtr = clients.txt file pointer

// fopen opens file. Exit program if unable to create file
if ((cfPtr = fopen("grades.txt", "w")) == NULL) {
puts("File could not be opened.");
}
else {
puts("Enter the students first & last name, ID, grade, and assignment.");

puts("Enter EOF to end input.");
printf("%s", "? ");

char firstName[30]; // student first name
char lastName[30]; // student last name
unsigned int stuID; // student ID
double grade; // student grade
char assignment[10]; // student assignment name

scanf("%5s%5s%d%lf%5s", firstName, lastName, &stuID, &grade, assignment);

// write first & last name, student ID, grade, and assignment name into file with fprintf

while(!feof(stdin)) {
fprintf(cfPtr, "%st%st%dt%.2ft%stn", firstName, lastName, stuID, grade, assignment);
fflush(cfPtr);
printf("%s", "? ");
scanf("%5s%5s%d%lf%5s", firstName, lastName, &stuID, &grade, assignment);
} // end while

fclose(cfPtr); // fclose closes file
} // end else
} // end main


Heres what happens when I execute it:



Enter the students first & last name, ID, grade, and assignment.



Enter EOF to end input.



? Freddy Krueger 1234 22.33 test1



? ? Jason Vorhees 1235 33.00 test1



? ? The Hulk 1236 2.95 test1



? Bat Man 1237 100.00 test1



? ^Z



[1]+ Stopped ./seqw





grade.txt file output:



Fredd y 0 0.00 ttime



Krueg er 1234 22.33 test1



Jason Vorhe 1234 22.33 test1



es 1235 33 0.00 test1



The Hulk 1236 2.95 test1



Bat Man 1237 100.00 test1



What am I doing wrong here? And where did ttime come from? And it's strange how it's tabbing part of the last name and making it another input.










share|improve this question













I'm working on a program that records students grades. The user inputs first name, last name, student ID, grade, and assignment name. I'm supposed to have the input from the user separated by being tabbed rather than a space. But when I execute the program the output in the txt file isn't correct.



#include <stdio.h>

int main(void){

FILE *cfPtr; // cfPtr = clients.txt file pointer

// fopen opens file. Exit program if unable to create file
if ((cfPtr = fopen("grades.txt", "w")) == NULL) {
puts("File could not be opened.");
}
else {
puts("Enter the students first & last name, ID, grade, and assignment.");

puts("Enter EOF to end input.");
printf("%s", "? ");

char firstName[30]; // student first name
char lastName[30]; // student last name
unsigned int stuID; // student ID
double grade; // student grade
char assignment[10]; // student assignment name

scanf("%5s%5s%d%lf%5s", firstName, lastName, &stuID, &grade, assignment);

// write first & last name, student ID, grade, and assignment name into file with fprintf

while(!feof(stdin)) {
fprintf(cfPtr, "%st%st%dt%.2ft%stn", firstName, lastName, stuID, grade, assignment);
fflush(cfPtr);
printf("%s", "? ");
scanf("%5s%5s%d%lf%5s", firstName, lastName, &stuID, &grade, assignment);
} // end while

fclose(cfPtr); // fclose closes file
} // end else
} // end main


Heres what happens when I execute it:



Enter the students first & last name, ID, grade, and assignment.



Enter EOF to end input.



? Freddy Krueger 1234 22.33 test1



? ? Jason Vorhees 1235 33.00 test1



? ? The Hulk 1236 2.95 test1



? Bat Man 1237 100.00 test1



? ^Z



[1]+ Stopped ./seqw





grade.txt file output:



Fredd y 0 0.00 ttime



Krueg er 1234 22.33 test1



Jason Vorhe 1234 22.33 test1



es 1235 33 0.00 test1



The Hulk 1236 2.95 test1



Bat Man 1237 100.00 test1



What am I doing wrong here? And where did ttime come from? And it's strange how it's tabbing part of the last name and making it another input.







c






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 19 at 22:58









SgtCheespuffs

133




133












  • I would start by checking what scanf is returning. If you didn't scan the right number of items you should stop there. You should also test your input for when yo stop, not after the fact with !feof. stackoverflow.com/questions/5431941/…
    – Retired Ninja
    Nov 19 at 23:01








  • 3




    Why are you restricting the string inputs to 5 characters? What do you think happens to the rest of the truncated strings?
    – Weather Vane
    Nov 19 at 23:06






  • 1




    You have 30-character variables, but only scan 5 characters
    – stark
    Nov 19 at 23:11






  • 2




    Please see Why is while ( !feof (file) ) always wrong?. You should always check the return value from scanf function family, and an idiomatic way to deal with both problems is while (scanf(...) == 5) { ... }
    – Weather Vane
    Nov 19 at 23:11










  • Your scanf statement should look like scanf("%30s%30s%u%d%10s", ...).
    – eapetcho
    Nov 20 at 4:13


















  • I would start by checking what scanf is returning. If you didn't scan the right number of items you should stop there. You should also test your input for when yo stop, not after the fact with !feof. stackoverflow.com/questions/5431941/…
    – Retired Ninja
    Nov 19 at 23:01








  • 3




    Why are you restricting the string inputs to 5 characters? What do you think happens to the rest of the truncated strings?
    – Weather Vane
    Nov 19 at 23:06






  • 1




    You have 30-character variables, but only scan 5 characters
    – stark
    Nov 19 at 23:11






  • 2




    Please see Why is while ( !feof (file) ) always wrong?. You should always check the return value from scanf function family, and an idiomatic way to deal with both problems is while (scanf(...) == 5) { ... }
    – Weather Vane
    Nov 19 at 23:11










  • Your scanf statement should look like scanf("%30s%30s%u%d%10s", ...).
    – eapetcho
    Nov 20 at 4:13
















I would start by checking what scanf is returning. If you didn't scan the right number of items you should stop there. You should also test your input for when yo stop, not after the fact with !feof. stackoverflow.com/questions/5431941/…
– Retired Ninja
Nov 19 at 23:01






I would start by checking what scanf is returning. If you didn't scan the right number of items you should stop there. You should also test your input for when yo stop, not after the fact with !feof. stackoverflow.com/questions/5431941/…
– Retired Ninja
Nov 19 at 23:01






3




3




Why are you restricting the string inputs to 5 characters? What do you think happens to the rest of the truncated strings?
– Weather Vane
Nov 19 at 23:06




Why are you restricting the string inputs to 5 characters? What do you think happens to the rest of the truncated strings?
– Weather Vane
Nov 19 at 23:06




1




1




You have 30-character variables, but only scan 5 characters
– stark
Nov 19 at 23:11




You have 30-character variables, but only scan 5 characters
– stark
Nov 19 at 23:11




2




2




Please see Why is while ( !feof (file) ) always wrong?. You should always check the return value from scanf function family, and an idiomatic way to deal with both problems is while (scanf(...) == 5) { ... }
– Weather Vane
Nov 19 at 23:11




Please see Why is while ( !feof (file) ) always wrong?. You should always check the return value from scanf function family, and an idiomatic way to deal with both problems is while (scanf(...) == 5) { ... }
– Weather Vane
Nov 19 at 23:11












Your scanf statement should look like scanf("%30s%30s%u%d%10s", ...).
– eapetcho
Nov 20 at 4:13




Your scanf statement should look like scanf("%30s%30s%u%d%10s", ...).
– eapetcho
Nov 20 at 4:13












1 Answer
1






active

oldest

votes

















up vote
0
down vote













the following proposed code:




  1. cleanly compiles

  2. performs the desired functionality

  3. properly checks for errors

  4. eliminates the 'magic' numbers by using #define statements to give those magic numbers meaningful names

  5. The call scanf() could be modified to incorporate the MAX CHARACTERS modifier(s) to be part of the parameter list, rather than hardcoded into the format string


And now, the proposed code:



#include <stdio.h>
#include <stdlib.h> // exit(), EXIT_FAILURE

#define MAX_FIRSTNAME_LEN 30
#define MAX_LASTNAME_LEN 30
#define MAX_ASSIGNMENT_LEN 10


int main( void )
{
FILE *cfPtr; // cfPtr = clients.txt file pointer

// fopen opens file. Exit program if unable to create file
if ((cfPtr = fopen("grades.txt", "w")) == NULL)
{
perror( "fopen to read grades.txt failed" );
exit( EXIT_FAILURE );
}
// implied else, fopen successful

puts("Enter the students first & last name, ID, grade, and assignment.");
puts("Enter EOF to end input.");
printf( "%s", "? " );

char firstName[ MAX_FIRSTNAME_LEN ]; // student first name
char lastName[ MAX_LASTNAME_LEN ]; // student last name
unsigned int stuID; // student ID
double grade; // student grade
char assignment[ MAX_ASSIGNMENT_LEN ]; // student assignment name

while( scanf( "%29s %29s %u %lf %9s", firstName, lastName, &stuID, &grade, assignment) == 5 )
{
fprintf( cfPtr,
"%st%st%dt%.2ft%stn",
firstName,
lastName,
stuID,
grade,
assignment);
printf( "%s", "? " );
} // end while

fclose( cfPtr ); // fclose closes file
} // end main





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%2f53383840%2fwrite-to-a-file-where-the-output-is-tabbed-instead-of-spaced%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
    0
    down vote













    the following proposed code:




    1. cleanly compiles

    2. performs the desired functionality

    3. properly checks for errors

    4. eliminates the 'magic' numbers by using #define statements to give those magic numbers meaningful names

    5. The call scanf() could be modified to incorporate the MAX CHARACTERS modifier(s) to be part of the parameter list, rather than hardcoded into the format string


    And now, the proposed code:



    #include <stdio.h>
    #include <stdlib.h> // exit(), EXIT_FAILURE

    #define MAX_FIRSTNAME_LEN 30
    #define MAX_LASTNAME_LEN 30
    #define MAX_ASSIGNMENT_LEN 10


    int main( void )
    {
    FILE *cfPtr; // cfPtr = clients.txt file pointer

    // fopen opens file. Exit program if unable to create file
    if ((cfPtr = fopen("grades.txt", "w")) == NULL)
    {
    perror( "fopen to read grades.txt failed" );
    exit( EXIT_FAILURE );
    }
    // implied else, fopen successful

    puts("Enter the students first & last name, ID, grade, and assignment.");
    puts("Enter EOF to end input.");
    printf( "%s", "? " );

    char firstName[ MAX_FIRSTNAME_LEN ]; // student first name
    char lastName[ MAX_LASTNAME_LEN ]; // student last name
    unsigned int stuID; // student ID
    double grade; // student grade
    char assignment[ MAX_ASSIGNMENT_LEN ]; // student assignment name

    while( scanf( "%29s %29s %u %lf %9s", firstName, lastName, &stuID, &grade, assignment) == 5 )
    {
    fprintf( cfPtr,
    "%st%st%dt%.2ft%stn",
    firstName,
    lastName,
    stuID,
    grade,
    assignment);
    printf( "%s", "? " );
    } // end while

    fclose( cfPtr ); // fclose closes file
    } // end main





    share|improve this answer

























      up vote
      0
      down vote













      the following proposed code:




      1. cleanly compiles

      2. performs the desired functionality

      3. properly checks for errors

      4. eliminates the 'magic' numbers by using #define statements to give those magic numbers meaningful names

      5. The call scanf() could be modified to incorporate the MAX CHARACTERS modifier(s) to be part of the parameter list, rather than hardcoded into the format string


      And now, the proposed code:



      #include <stdio.h>
      #include <stdlib.h> // exit(), EXIT_FAILURE

      #define MAX_FIRSTNAME_LEN 30
      #define MAX_LASTNAME_LEN 30
      #define MAX_ASSIGNMENT_LEN 10


      int main( void )
      {
      FILE *cfPtr; // cfPtr = clients.txt file pointer

      // fopen opens file. Exit program if unable to create file
      if ((cfPtr = fopen("grades.txt", "w")) == NULL)
      {
      perror( "fopen to read grades.txt failed" );
      exit( EXIT_FAILURE );
      }
      // implied else, fopen successful

      puts("Enter the students first & last name, ID, grade, and assignment.");
      puts("Enter EOF to end input.");
      printf( "%s", "? " );

      char firstName[ MAX_FIRSTNAME_LEN ]; // student first name
      char lastName[ MAX_LASTNAME_LEN ]; // student last name
      unsigned int stuID; // student ID
      double grade; // student grade
      char assignment[ MAX_ASSIGNMENT_LEN ]; // student assignment name

      while( scanf( "%29s %29s %u %lf %9s", firstName, lastName, &stuID, &grade, assignment) == 5 )
      {
      fprintf( cfPtr,
      "%st%st%dt%.2ft%stn",
      firstName,
      lastName,
      stuID,
      grade,
      assignment);
      printf( "%s", "? " );
      } // end while

      fclose( cfPtr ); // fclose closes file
      } // end main





      share|improve this answer























        up vote
        0
        down vote










        up vote
        0
        down vote









        the following proposed code:




        1. cleanly compiles

        2. performs the desired functionality

        3. properly checks for errors

        4. eliminates the 'magic' numbers by using #define statements to give those magic numbers meaningful names

        5. The call scanf() could be modified to incorporate the MAX CHARACTERS modifier(s) to be part of the parameter list, rather than hardcoded into the format string


        And now, the proposed code:



        #include <stdio.h>
        #include <stdlib.h> // exit(), EXIT_FAILURE

        #define MAX_FIRSTNAME_LEN 30
        #define MAX_LASTNAME_LEN 30
        #define MAX_ASSIGNMENT_LEN 10


        int main( void )
        {
        FILE *cfPtr; // cfPtr = clients.txt file pointer

        // fopen opens file. Exit program if unable to create file
        if ((cfPtr = fopen("grades.txt", "w")) == NULL)
        {
        perror( "fopen to read grades.txt failed" );
        exit( EXIT_FAILURE );
        }
        // implied else, fopen successful

        puts("Enter the students first & last name, ID, grade, and assignment.");
        puts("Enter EOF to end input.");
        printf( "%s", "? " );

        char firstName[ MAX_FIRSTNAME_LEN ]; // student first name
        char lastName[ MAX_LASTNAME_LEN ]; // student last name
        unsigned int stuID; // student ID
        double grade; // student grade
        char assignment[ MAX_ASSIGNMENT_LEN ]; // student assignment name

        while( scanf( "%29s %29s %u %lf %9s", firstName, lastName, &stuID, &grade, assignment) == 5 )
        {
        fprintf( cfPtr,
        "%st%st%dt%.2ft%stn",
        firstName,
        lastName,
        stuID,
        grade,
        assignment);
        printf( "%s", "? " );
        } // end while

        fclose( cfPtr ); // fclose closes file
        } // end main





        share|improve this answer












        the following proposed code:




        1. cleanly compiles

        2. performs the desired functionality

        3. properly checks for errors

        4. eliminates the 'magic' numbers by using #define statements to give those magic numbers meaningful names

        5. The call scanf() could be modified to incorporate the MAX CHARACTERS modifier(s) to be part of the parameter list, rather than hardcoded into the format string


        And now, the proposed code:



        #include <stdio.h>
        #include <stdlib.h> // exit(), EXIT_FAILURE

        #define MAX_FIRSTNAME_LEN 30
        #define MAX_LASTNAME_LEN 30
        #define MAX_ASSIGNMENT_LEN 10


        int main( void )
        {
        FILE *cfPtr; // cfPtr = clients.txt file pointer

        // fopen opens file. Exit program if unable to create file
        if ((cfPtr = fopen("grades.txt", "w")) == NULL)
        {
        perror( "fopen to read grades.txt failed" );
        exit( EXIT_FAILURE );
        }
        // implied else, fopen successful

        puts("Enter the students first & last name, ID, grade, and assignment.");
        puts("Enter EOF to end input.");
        printf( "%s", "? " );

        char firstName[ MAX_FIRSTNAME_LEN ]; // student first name
        char lastName[ MAX_LASTNAME_LEN ]; // student last name
        unsigned int stuID; // student ID
        double grade; // student grade
        char assignment[ MAX_ASSIGNMENT_LEN ]; // student assignment name

        while( scanf( "%29s %29s %u %lf %9s", firstName, lastName, &stuID, &grade, assignment) == 5 )
        {
        fprintf( cfPtr,
        "%st%st%dt%.2ft%stn",
        firstName,
        lastName,
        stuID,
        grade,
        assignment);
        printf( "%s", "? " );
        } // end while

        fclose( cfPtr ); // fclose closes file
        } // end main






        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 20 at 7:16









        user3629249

        10.8k1914




        10.8k1914






























            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%2f53383840%2fwrite-to-a-file-where-the-output-is-tabbed-instead-of-spaced%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

            To store a contact into the json file from server.js file using a class in NodeJS

            Redirect URL with Chrome Remote Debugging Android Devices

            Dieringhausen