User Tools

Site Tools


docu_write

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

docu_write [2018/08/06 20:00]
Niek created
docu_write [2018/08/08 14:41] (current)
Niek
Line 13: Line 13:
  
 <​code>​ <​code>​
-IF 1 == 1 THEN write '​textline'​ TO /​home/​pi/​myfile.txt MODE new => deletes file if it exists and creates new file+IF 1 == 1 THEN write TEXT '​textline'​ TO /​home/​pi/​myfile.txt MODE new => deletes file if it exists and creates new file
    
-IF 1 == 1 THEN write '​textline'​ TO /​home/​pi/​myfile.txt MODE append => opens existing file or creates new file if it doesn'​t exist and appends text to the end of it+IF 1 == 1 THEN write TEXT '​textline'​ TO /​home/​pi/​myfile.txt MODE append => opens existing file or creates new file if it doesn'​t exist and appends text to the end of it
   ​   ​
 </​code>​ </​code>​
  
-**IMPORTANT:​ Be careful when using this action! Very frequently writing files to your SD-card will shorten its lifetime. If you intend to write files very often it is better to use an external (USB) device like an usb-stick, or usb-diskdrive.**+**IMPORTANT:​ Be careful when using this action ​if your filesystem is on an SD card! Very frequently writing files to your SD-card will shorten its lifetime. If you intend to write files very often it is better to use an external (USB) device like an usb-stick, or -harddisk.**
  
  
docu_write.txt ยท Last modified: 2018/08/08 14:41 by Niek