4 ms·
"echo -n " is useless, is sufficient: > example.txt without prepending the echo command. This will create an empty file or it will truncate an existent file.
by gabrielblack 7y ago
"echo -n " is useless, is sufficient:
> example.txt
without prepending the echo command. This will create an empty file or it will truncate an existent file. The touch command could be preferable to preserve the content, if needed.
- gabrielblack 7y agoP.S. >> example.txt this one (with a double > ) could replace touch in this application case: it's less readable but more efficient.