I have several shell install scripts that used to work under 5.0, 5.2, 6.0 and 6.2, but cannot be interpreted under 7.0 For example, the WordPerfect 8.0 install cd-rom contains a 'install.wp' script. When I run it, I get several syntax errors, and the script doesn't run. This script worked fine under RedHat 6.2. Is there some new syntax for shell scripts? Is there a backwards compatibility switch? Thanks for your help. Dave Rector drector
The problem might be that RH7 uses bash2 as default instead of bash 1.x. Try running the install scripts with bash1 as interpreter (install bash1, change the first line of the script to point to bash1).
See also /usr/share/doc/bash-2.04/COMPAT for detailed list of changes between bash1 and bash2. Changing component to bash ...
Using bash1 did not work bash2 gives the following message: ------------------------------------------------------------- [root@brave cdrom]# ./install.wp Please Wait ../install.wp: [: 16-22: integer expression expected .. ./install.wp: linux/ins/wpinstg: No such file or directory -------------------------------------------------------------- bash1 (bash1-1.14.7-169 RPM for i386) gives a similar message: ------------------------------------------------------------- [root@brave cdrom]# ./install.wp Please Wait ../install.wp: [: integer expression expected before -lt .. ./install.wp: linux/ins/wpinstg: No such file or directory ------------------------------------------------------------- Something else must be different, because this script gives no errors under RedHat 6.2 There are many many errors after the first ones printed here. The script is very long, and would perfer if I did not have to rewrite it. Thanks for your help Dave Rector *:^)
OK, I have figured out my problem, there are two issues: 1) bash1 was required for script compatibility 2) libc5 was required to run the script. The deletion of these two components from RH7.0 breaks many of my commercial products as well as many things that I and others have developed. Thanks for your help. Dave Rector
It's not a bug then - we can't keep old compatibility cruft forever. If you get any stuff that still requires libc 5.x, you should ask the vendor for an update. libc5 has been obsolete for a couple of years now. The same goes for the change bash 1.x -> bash 2.x - bash 2.x is much more POSIX compliant, so it's the way to go. If something works in 1.x but not 2.x, it's a bug in the script.