"Roberto C. Sanchez" writes:
Why not just use wc and sed?
A good idea and also a good idea from Rick Pasotto <rick@niof.net>
to use head -n -6. There is, however, a problem with that last
suggestion in that the script is actually being run on a FreeBSD
system and FreeBSD's version of head does not support the -n flag.
Both Debian and FreeBSD, however, had the same problem with the loop.
The function gets called with a bunch of values passed as
arguments instead of getting one value per run.
When I use sh -x scriptname, the output doesn't look like a
normal loop.
Thanks for any more ideas.