Skip to main content
added 5 characters in body
Source Link
John1024
  • 76.4k
  • 12
  • 177
  • 165

Replace all output lines, such as:

date +"%d:%m" >> dbdata.growth

with lines such as:

date +"%d:%m" | tr -d $'\n' >> dbdata.growth

This uses tr to delete newline characters before they are put in the output file.

tr is a translate or delete utility. In this case, the use of the -d option tells it to delete. The character that we ask it to delete is the newline character, expressed as $'\n'.

Replace all output lines, such as:

date +"%d:%m" >> dbdata.growth

lines such as:

date +"%d:%m" | tr -d $'\n' >> dbdata.growth

This uses tr to delete newline characters before they are put in the output file.

tr is a translate or delete utility. In this case, the use of the -d option tells it to delete. The character that we ask it to delete is the newline character, expressed as $'\n'.

Replace all output lines, such as:

date +"%d:%m" >> dbdata.growth

with lines such as:

date +"%d:%m" | tr -d $'\n' >> dbdata.growth

This uses tr to delete newline characters before they are put in the output file.

tr is a translate or delete utility. In this case, the use of the -d option tells it to delete. The character that we ask it to delete is the newline character, expressed as $'\n'.

Source Link
John1024
  • 76.4k
  • 12
  • 177
  • 165

Replace all output lines, such as:

date +"%d:%m" >> dbdata.growth

lines such as:

date +"%d:%m" | tr -d $'\n' >> dbdata.growth

This uses tr to delete newline characters before they are put in the output file.

tr is a translate or delete utility. In this case, the use of the -d option tells it to delete. The character that we ask it to delete is the newline character, expressed as $'\n'.