[plug] my Linux is too young! Need older "tail" and "head"
Denis Brown
dsbrown at cyllene.uwa.edu.au
Wed Jun 30 22:35:52 WST 2004
Dear PLUG list members,
I notice that some shell scripts I meet when installing programmes
(neuroimaging and MatLab for example) generate errors when the syntax
conforms to the old method of specifying the number of lines to output.
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
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'
But later versions of tail (and head) like a syntax of
tail -lines=1 as an example.
Some scripts I can modify and when I do so all is sweet. Today I met a
CD-ROM-ised script which pretty much insists on being run from /dev/cdrom,
the MatLab script portion of which is shown above. This is a show
stopper in that I cannot (do not, at least at present) have facility to
burn a fresh CD with an edited script. Nor may that be especially legal
given that this is proprietary code!!!
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 :-)
TIA,
Denis
More information about the plug
mailing list