File input/output: Difference between revisions
Content added Content deleted
No edit summary |
(→{{header|TXR}}: Added.) |
||
Line 2,639: | Line 2,639: | ||
status=WRITE(path2output,contentinput) |
status=WRITE(path2output,contentinput) |
||
</lang> |
</lang> |
||
=={{header|TXR}}== |
|||
As a character string: |
|||
<lang txrlisp>(let ((var (file-get-string "input.txt"))) |
|||
(file-put-string "output.txt" var))</lang> |
|||
As a list of lines: |
|||
<lang txrlisp>(let ((var (file-get-lines "input.txt"))) |
|||
(file-put-lines "output.txt" var))</lang> |
|||
=={{header|UNIX Shell}}== |
=={{header|UNIX Shell}}== |
||
Using the 'read' built-in |
Using the 'read' built-in |