installclientsdk bug?
Posted in 1999
Topics: Installation, Setup & Upgrades, Platform-Specific Issues
hello, I'm installing the new client sdk 2.2 for informix 7.2 on solaris 7 and it seems the installation script has a bug in it. I've isolated the problem to the following: #problem with the expr expressions ins_rel=`expr /$tmp1 : '.*/\\([A-Z][A-Z]\\)'` tmp2=`echo $nvers|awk 'BEGIN {FS="."} {print $3}'` #same problem as the one above new_rel=`expr /$tmp2 : '.*/\\([A-Z][A-Z]\\)'` if test `expr $ins_rel \\> $new_rel` = 1 ; then return 1 elif test `expr $ins_rel \\< $new_rel` = 1 ; then return 0 fi Can someone enlighten me :-) this are the errors: expr: syntax error installclientsdk: test: argument expected thanks in advance. Julnio
Well found the error, there should be no spaces when using the : operator, so: ins_rel=`expr /$tmp1 : '.*/\\([A-Z][A-Z]\\)'` should be ins_rel=`expr /$tmp1:'.*/\\([A-Z][A-Z]\\)'` new_rel=`expr /$tmp2 : '.*/\\([A-Z][A-Z]\\)'` should be new_rel=`expr /$tmp2:'.*/\\([A-Z][A-Z]\\)'` Julnio A Vasquez <jvasquez@cs.buffalo.edu> wrote: : hello, : I'm installing the new client sdk 2.2 for informix 7.2 on solaris 7 and it : seems the installation script has a bug in it. I've isolated the problem to : the following: : #problem with the expr expressions : ins_rel=`expr /$tmp1 : '.*/\\([A-Z][A-Z]\\)'` : tmp2=`echo $nvers|awk 'BEGIN {FS="."} {print $3}'` : #same problem as the one above : new_rel=`expr /$tmp2 : '.*/\\([A-Z][A-Z]\\)'` : : if test `expr $ins_rel \\> $new_rel` = 1 ; then : return 1 : elif test `expr $ins_rel \\< $new_rel` = 1 ; then : return 0 : fi : Can someone enlighten me :-) this are the errors: : expr: syntax error : installclientsdk: test: argument expected : thanks in advance. : Julnio
Julnio A Vasquez wrote: > Well found the error, there should be no spaces when using the : > operator, so: > > ins_rel=`expr /$tmp1 : '.*/\\([A-Z][A-Z]\\)'` > should be > ins_rel=`expr /$tmp1:'.*/\\([A-Z][A-Z]\\)'` I'm dubious. The second form is asking the expr command to do a different job from the first. I guess it might coincidentally work, but under normal Unix (and POSIX.2) rules, the : used for matching strings has to be a separate argument to the expr command. The first version (with spaces) expects $tmp1 to contain an arbitrary string of characters, followed by a slash and two upper case letters, and should return just the two upper case letters. The second, revised, form doesn't have an obvious meaning when I examine the POSIX.2 standard. The standard is quite explicit that the ':' operator should be a separate argument. Are you sure you're using the standard expr command? > new_rel=`expr /$tmp2 : '.*/\\([A-Z][A-Z]\\)'` > should be > new_rel=`expr /$tmp2:'.*/\\([A-Z][A-Z]\\)'` > > Julnio A Vasquez <jvasquez@cs.buffalo.edu> wrote: > > : hello, > > : I'm installing the new client sdk 2.2 for informix 7.2 on solaris 7 and it > : seems the installation script has a bug in it. I've isolated the problem to > : the following: > > : #problem with the expr expressions > : ins_rel=`expr /$tmp1 : '.*/\\([A-Z][A-Z]\\)'` > : tmp2=`echo $nvers|awk 'BEGIN {FS="."} {print $3}'` > > : #same problem as the one above > : new_rel=`expr /$tmp2 : '.*/\\([A-Z][A-Z]\\)'` > : > : if test `expr $ins_rel \\> $new_rel` = 1 ; then > : return 1 > : elif test `expr $ins_rel \\< $new_rel` = 1 ; then > : return 0 > : fi > > : Can someone enlighten me :-) this are the errors: > > : expr: syntax error > : installclientsdk: test: argument expected > > : thanks in advance. > > : Julnio -- Jonathan Leffler (jleffler@informix.com, jleffler@earthlink.net) Guardian of DBD::Informix v0.60 -- see http://www.perl.com/CPAN #include <disclaimer.h>