Re: script to list last records of files - script $1 vs awks $1



In article <1184292886.699041.238550@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
jobs <jobs@xxxxxxxxxx> wrote:

one more ..

given

tail -1 *86

what's the best way to list the filename along with the last line?

I don't see it in the man page.

thank you!

for file in *86; do
echo "$file"
tail -1 "$file"
done

--
Barry Margolin, barmar@xxxxxxxxxxxx
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***
.



Relevant Pages