On Wed, 2013-05-15 at 18:11 -0300, Fernando wrote: > Em 15-05-2013 17:54, Michael E. Maher escreveu:> > > > On Wed, 2013-05-15 at 17:47 -0300, Fernando wrote: > >> error message: > >> /usr/bin/xzless: line 49: test: 458 (POSIX regular expressions): integer > >> expression expected > >> > >> (used env in order to get English message, but it appears in my locale > >> LANG too.) > >> > >> Line 49 of xzless is: > >> > >> if test "$(less -V | { read ver && echo ${ver#less }; })" -ge 429; then > > > > Looks like the command: > > `less -V | { read ver && echo ${ver#less }; }' > > Is giving something other than an integer (from: integer expression > > expected). > > > > Could you give us the output of: > > $ less -V > > $ less -V | { read ver && echo ${ver#less }; } > > > > > > Thanks, > > Michael > > Thank you, Michael, > > root [ /tmp ]# less -V > less 458 (POSIX regular expressions) > Copyright (C) 1984-2012 Mark Nudelman > > less comes with NO WARRANTY, to the extent permitted by law. > For information about the terms of redistribution, > see the file named README in the less distribution. > Homepage: http://www.greenwoodsoftware.com/less > > root [ /tmp ]# less -V | { read ver && echo ${ver#less }; } > 458 (POSIX regular expressions) > root [ /tmp ]# > > Same as normal user. > > Should have told that I am in chroot. > > > -- > []s, > Fernando
Hi Fernando, The mail from Matias really says it all, it's the extra `(POSIX regular expressions)' which is screwing up the integer comparison `if test "..." -ge 429; then'. This seems like a bug in either: less -V giving too much information for xz - or - xzless assuming that less -V is a certain way For a quick (untested) hack, you could remove the check or change the statement to: if test "$(less -V | { read ver && echo ${ver#less }; } | awk '{print $1}')" -ge 429; then I'm sure others on this list will be able to give much better answers. It's probably good to file a bug with the relevant upstream in any case. Hope that helps, Thanks, Michael -- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page