note
ikegami
<c>
capture('bash', '-o', 'pipefail', '-c',
'cat "$1" | wc -l',
'dummy', $file)
</c>
<p>This also solves your problem with file names with spaces or other shell metachars.
<p>This is just an example, right? Cause you could use the following or a small amount of Perl code.
<c>
capture('wc', '-l', $file)
</c>
1063512
1063512