I need to use "shar" to archive a 20MB binary. When I unshar the resulting archive on my RedHat 6.0 box, using "sh filename" it seemingly hangs. It is not really hanging but rather it is consuming more and more memory and getting slower and slower and usually when "top" reports it used 160MB and still increasing I kill the process. On another machine when we let it continue for longer, lazy-swap starting killing processes and eventually we had to reboot the machine to recover. Note : no problem with zsh on Linux, or AIX/Solaris or HPUX posix shells. The problem appears to be that the shar archive contains a 40MB "hereis" document (a uuencoded version of my 20MB binary) which is input to the "unpacker" program. The shell appears to be trying to read it all into memory. I can work around the problem if I manually edit the shar archive to avoid the use of the "hereis" document (using awk to pipe every line between the beginning and end markers directly into the unpacker program seems to use the least amount of memory). But I do not want to do this every time I generate such a shar file. I am using RedHat 6.0, bash 1.14.7 (but I also reproduced it on 2.03), on a Pentium III PC with 128MB of Memory.
Red Hat Linux is no longer supported by Red Hat, Inc. If you are still running Red Hat Linux, you are strongly advised to upgrade to a current Fedora Core release or Red Hat Enterprise Linux or comparable. Some information on which option may be right for you is available at http://www.redhat.com/rhel/migrate/redhatlinux/. Red Hat apologizes that these issues have not been resolved yet. We do want to make sure that no important bugs slip through the cracks. Please check if this issue is still present in a current Fedora Core release. If so, please change the product and version to match, and check the box indicating that the requested information has been provided. Note that any bug still open against Red Hat Linux on will be closed as 'CANTFIX' on September 30, 2006. Thanks again for your help.
Red Hat Linux is no longer supported by Red Hat, Inc. If you are still running Red Hat Linux, you are strongly advised to upgrade to a current Fedora Core release or Red Hat Enterprise Linux or comparable. Some information on which option may be right for you is available at http://www.redhat.com/rhel/migrate/redhatlinux/. Closing as CANTFIX.