Pattern: Ungrouped >>
redirects
Issue: -
Rather than adding >> something
after every single line, you can simply group the relevant commands and redirect the group.
Example of incorrect code:
echo foo >> file
date >> file
cat stuff >> file
Example of correct code:
{
echo foo
date
cat stuff
} >> file