On 9/13/07, M.Canales.es <[EMAIL PROTECTED]> wrote:
> El Jueves, 13 de Septiembre de 2007 12:34, Jean-Luc Delatre escribió:
>
> > The check_prerequisites() in common/libs/func_check_version.sh fails on
> > FIND and GREP because "fancy" version numbers on Knoppix 5.1 contain
> > intermediate noise words which confuse the 'cut -d" " -f4'.
>
> There is no way to make happy all that distros that insist on customize the
> default version string output for some tools. I such cases jhalfs will prompt
> you:
Manuel, this one is actually not that hard to fix, so long as we
believe the last field is always the version number. Instead of
hardcoding the field number with cut, just use the last field with
awk.
$ grep --version | head -n1 | awk '{print $NF}'
2.5.1
--
Dan
--
http://linuxfromscratch.org/mailman/listinfo/alfs-discuss
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page