in reply to Re^6: Clear the contents of the text file
in thread Clear the contents of the text file
You can't have a "self-contained test" if you are testing writing to a file. You need to write to the file. The shell commands showed the output of cat. The test showed exactly what the output indicated:
If you pass append() an empty string, as shown in the spew() example I was replying to, you will get an error.
And the reason to do this in the OP's case is not for file permission preservation, but for file locking.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^8: Clear the contents of the text file
by Anonymous Monk on Jul 22, 2015 at 03:35 UTC | |
by 1nickt (Canon) on Jul 22, 2015 at 03:45 UTC | |
by Anonymous Monk on Jul 22, 2015 at 04:04 UTC |