[plug] my Linux is too young! Need older "tail" and "head"

Craig Ringer craig at postnewspapers.com.au
Wed Jun 30 22:42:46 WST 2004


Denis Brown wrote:

> As an example, an installation programme (shell script) performs a
> compilation of source code and at the end, examines a log file to see if
> the last line is a success code or failure.   Something like
> tail -1 thislog.txt

That should work fine. 'tail' is a standalone program anyway, not a part 
of the shell, and it's been consistent for an impressively long time.

> Another example (from MatLab) is where the installer seeks info regarding
> the libc version with among other things...
> ver='/lib/libc.so.6 | head -1 | sed -e blah, blah, blah'

That's incredibly cool - I had no idea shared libraries could be 
executable. It seems that most library authors didn't either, as most of 
the others I quickly looked at coredumped instantly :-(

> I suppose the option I have is to get from somewhere a more forgiving
> (elderly?) tail and head and put them in the path before the system tail
> and head (or symlink to them, etc).   Seems a bit messy to me so I turn
> here for further inspiration :-)

Are you sure you're not running into another issue - for example, a 
shell-provided 'tail' that takes different syntax? Have you tried 
'/bin/sh /path/to/install/script.sh' to see if that helps?

--
Craig Ringer




More information about the plug mailing list