Skip to main content

write

Write a string to a file.

Usage​

write <string> <file>

Description​

  • Opens the file in write mode (creates or truncates)
  • Writes the specified string content
  • Reports an error on empty string or open failure

Example​

write "Hello, World!" /greeting.txt