in reply to Just a quickie about FH:s

Here's one way if you know the line numbers are 7 and 11:

$ perl -e 'open FH,"soversions.mk";print( (<FH>)[6,10])' all-sonames+=libdl=libdl.so$(libdl.so-version) all-sonames+=libresolv=libresolv.so$(libresolv.so-version)
The (<FH>)[6,10] construct is a slice over the array of lines in the file. They are offset to allow for the usual convention for line counting in a file.

After Compline,
Zaxo

Replies are listed 'Best First'.
Thanks!
by drifter (Scribe) on Dec 14, 2001 at 18:01 UTC
    Thanks, this was exactly what I was looking for ,)
    Funny tho that I didn't find any documentation about this even as I looked though all manpages and my perl bibles...