On Fri, Oct 30, 2020 at 12:52:11PM -0400, Greg Wooledge wrote:
>
> size=$(wc -c < "$file")
It may be better to use: wc -c "%file"
As 'wc' can use the file size (via fstat).
The '<' forces wc to read the file content.
Which can be significantly slower for large (video) files.
Regards, Mike Jonkmans
--
Mike Jonkmans <bashbug@jonkmans.nl>