
19 Oct
2010
19 Oct
'10
7:24 a.m.
Dear Mike Frysinger,
In message 201010190017.52346.vapier@gentoo.org you wrote:
- @actual=`wc -c $@ | awk '{print $$1}'`; \
How about using
stat -c '%s'
to get the file size in a single command, without need to actually read all the data?
because `stat` isnt portable :(. it isnt part of the POSIX standard ... OSX certainly does not support this, and i imagine most *BSD's dont.
I see (well, at least FreeBSD 8.1 has "stat"; their man page claims it "appeared in NetBSD 1.6 and FreeBSD 4.10).
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
"The two most common things in the universe are hydrogen and stupi-
dity."