Issue
echo "text" >> 'Users/Name/Desktop/TheAccount.txt'
How do I make it so it creates the file if it doesn't exist, but overwrites it if it already exists. Right now this script just appends.
Solution
The >>
redirection operator will append lines to the end of the specified file, where-as the single greater than >
will empty and overwrite the file.
echo "text" > 'Users/Name/Desktop/TheAccount.txt'
Answered By - Nylon Smile Answer Checked By - Gilberto Lyons (WPSolving Admin)