Errors while running shell scripts: /bin/sh: error importing function definition for `which'

Solution Verified - Updated -

Issue

While trying to run third-party shell scripts distributed by Oracle and SAP, the following error is showing:

ORA-29913: error in executing ODCIEXTTABLEFETCH callout
  ORA-29400: data cartridge error
 KUP-04095: preprocessor command /oracle/PJ1/19/QOpatch/qopiprep.bat encountered error "/bin/sh: which: line 1: syntax error: unexpected end of file
  /bin/sh: error importing function definition for `which'

Environment

  • Red Hat Enterprise Linux 8.5+.
  • The system is running SAP on Oracle DB.
  • scl-utils and environment-modules RPM's are not installed.

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content