File size: Difference between revisions

(add →‎Joy)
Line 901:
alert(event);
}</syntaxhighlight>
 
=={{header|Joy}}==
<syntaxhighlight lang="joy">DEFINE filesize == "r" fopen 0 2 fseek pop ftell swap fclose.
 
"input.txt" filesize.
"/input.txt" filesize.</syntaxhighlight>
 
=={{header|jq}}==
Line 906 ⟶ 912:
 
jq -Rs length /input.txt</syntaxhighlight>
 
The -R option causes the file to be read as text, and the -s option causes it to be read as a single string.
 
559

edits