|
The head/tail way is really the only way to do it with a conventional shell script. You can do shell-scripting with Perl and PHP, you might want consider using one of those if you're going to be parsing a file. I combine both shell-scripts and PHP scripts for my system-admin work.
|