0

I have a C file, where there are some uppercase letters, with the tr command I managed to change the uppercase letters to lowercase, but as soon as I try to save the result in the same file I see everything the file overwrite.

  • 1
    Write the output to a new file and overwrite the original if it was successful `tr ... < INPUT > /tmp/tmp$$ && mv /tmp/tmp$$ INPUT` or use `sed -i ...` or Perl https://stackoverflow.com/a/6995010/2836621 – Mark Setchell Feb 07 '22 at 23:08

0 Answers0