Wishlist: Append to File
-
Wishlist: Append to file, either as an option on M560 and M28, or as a separate command.
-
@donstauffer would the following extension of the echo command meet your requirements instead?
echo >"file.g" expression expression ...
would delete file.g if it exists, create file.g, and write the result of expanding expression expression ... as a single line to that file instead of to the console.
echo >>"file.g" expression expression ...
As in the previous case, but if the file already exists, append the expressions to the existing contents as a new line.
The advantage of this over M28 is that you can do variable substitution in the expressions before writing them.
-
@dc42 I think it probably would, as long as using that extension suppressed writing the expression(s) to console and just quietly wrote to the file.
-
@donstauffer yes it would only write to the file, unless an error occurred.
-
@dc42 - Did this wishlist item get any traction? I'm working on writing some macros and also want to append to an existing file. The echo method you suggest would work for me.
My alternative is to stop logging, repoint the logger to my file write my stuff to my file, then restart logging to the original log file - not very elegant.
Thanks!
-
-
Thanks @P3P3Tony. I see it in the meta commands page in the wiki. Should heave read more closely. Looks like I need to do a fw update.
-
-