title: Appending to a file while looping in a Bash Script but opening a new file each script execution
body: <p>I am looping through a text file and adding matching lines to a text file using <code>&gt;&gt; FinalCopy.txt</code>. However, I would like to always open <code>FinalCopy.txt</code> as a blank text file every time I execute the script and overwrite it with whatever new data the bash script generates during run time.</p>