I wrote c code to read from a text file and then bash code to output it to another file (specifically './executable &> output.txt'). When I print it on the command line it looks fine, but when I check the output file, it has a '^@' symbol at the end of it.
CodePudding user response:
You have a bug in your program, it's writing a nul character at the end of your file. Then whatever tool you use to check the output is using: caret notation for non-printable characters.
^@
is the notation for the nul character.
We cannot tell more without seeing the code.