Re: more of a linux question

From: Mladen Gogala <gogala.mladen_at_gmail.com>
Date: Sun, 15 Oct 2023 14:37:37 -0400
Message-ID: <aaec2c3c-943c-4fed-bf79-3a5b97c7e491_at_gmail.com>



On 10/14/23 02:38, Laurentiu Oprea wrote:
> First I made a mistake, is RHEL8 (not RHEL7) vs RHEL6. I thought  I
> had a CPU problem due to VMware layer, but it seems like my script is
> running in equal amounts of time in both rhel6/8 if executed under KSH
> and not BASH.

There are several different versions of bash: https://tldp.org/LDP/abs/html/bash2.html

The current version of bash is 5.2:

    /home/mgogala# rpm -qa|grep bash

    bash-5.2.15-3.fc38.x86_64

    bash-completion-2.11-9.fc38.noarch

I am running Fedora 38 on my desktop, which is the latest version and the bash shell is also the latest usable version:

    /home/mgogala# cat /etc/fedora-release

    Fedora release 38 (Thirty Eight)

Korn shell, on the other hand, is much older and much simpler software. RHEL6 is an old and unsupported version, not receiving the new security and performance updates. That means that bash in RHEL6 is probably version 3 or 4. In other words, what you may be dealing with is a faulty version of bash. That is why everything looks normal when using the Korn shell and slow when using bash.

I would advise downloading the bash package for CentOS6 and installing it on your RHEL6. Here is where you can find it:

CentOS 6 vault.centos.org/6.1/updates/x86_64/Packages/bash-4.1.2-8.el6.x86_64.rpm <https://rpm.pbone.net/info_idpl_73462276_distro_centos6_com_bash-4.1.2-8.el6.x86_64.rpm.html>

That *_might_* help. If it doesn't help, you will have to upgrade your Linux.

-- 
Mladen Gogala
Database Consultant
Tel: (347) 321-1217
https://dbwhisperer.wordpress.com

--
http://www.freelists.org/webpage/oracle-l
Received on Sun Oct 15 2023 - 20:37:37 CEST

Original text of this message