File input/output: Difference between revisions

(File input/output in various BASIC dialents (BASIC256, QBasic, True BASIC and Yabasic))
Line 2,272:
=={{header|jq}}==
If the input file consists of ordinary lines of text, then the lines can be copied verbatim, one by one, as follows:
<lang jq>jq -M --raw-input --raw-output '. as $line | $line' input.txt > output.txt
</lang>
 
If the input file consists of JSON entities, and if we wish to "pretty print" each, then the following will suffice:<lang jq>
jq -M '. as $line | $line' input.txt > output.txt
</lang>
 
2,478

edits