Sponsored Content
Top Forums Shell Programming and Scripting Script to find Error: rpmdb open failed on list of servers Post 303036308 by MadeInGermany on Saturday 22nd of June 2019 05:39:13 AM
Old 06-22-2019
For using the <( ) and >( ) process substitution, the OS must support Unix devices, and bash must be compiled to utilize it.
Obviously not true for your OS and bash.?
Code:
uname -sr
bash --version

The following pipes stderr (descriptor 2) to sed. But a pipe works with stdout (descriptor 1) only. Therfore, it swaps stdin and stdout before the pipe, and afterwards swaps them back.
Code:
#!/bin/bash
for server in server1 server2
do
  {
  ssh -x "$server" '
    echo "hello I am on `hostname`"
    sudo yum update infolist
  '  3>&2 2>&1 1>&3 | sed "s/^/$server: /" 
  } 3>&2 2>&1 1>&3
done 2>stderr

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Failed to open output file Error

Hi guys, I Have written a script,In that it will call another file which contains the sql quaries. while wxecuting that I am getting the below exception 01/16|06:28:06:16800: Operating System Error|Failed to open output file Can anybody help me about this,,Its urgent (0 Replies)
Discussion started by: Anji
0 Replies

2. Shell Programming and Scripting

Script Error: 13192.sumr: 0403-016 Cannot find or open the file.

Hello, i am familiar enough with unix to do some damage but thats about it. We have a set of RS/6000 43P Model 150's running AIX for our Catia V4 programmers. back in the 90's a script was written to automate the conversion of files into machine code. that script has started giving us... (0 Replies)
Discussion started by: jgruenwald
0 Replies

3. Shell Programming and Scripting

Telnet script to test open ports on mult servers

Hello All, Can somebody help me with this script. I have an output file with a list of servers ips and ports. I need to be able to run this script to list all the server ips in the outfile and find out if the port is open or not. #!/bin/sh IFS=#;for i in $(cat portTest); do # check... (2 Replies)
Discussion started by: liketheshell
2 Replies

4. Solaris

Error:: libm.so.2:open failed

Hi, I am working with solaris 9 and I want to install perforce on that,so I downloaded the p4v.bin file and try to install it by the command ./p4v after that it is giving the error--- ld.so.1: ./p4v.bin: fatal: libm.so.2: open failed: No such file or directory Killed I am not... (3 Replies)
Discussion started by: smartgupta
3 Replies

5. Solaris

Error- ld.so.1: expr: fatal: libgmp.so.3: open failed:No such file or directory

Hi Friends I have a compiler(Sun Forte,I believe) running in my Solaris 9 box. since y'day my development team is finding this error when they compile: ld.so.1: expr: fatal: libgmp.so.3: open failed: No such file or directory I ran a search for this file and found it in one of my file... (2 Replies)
Discussion started by: Hari_Ganesh
2 Replies

6. UNIX for Dummies Questions & Answers

NDM: Source file open failed. Error= 2

Hi, I have try to ndm to one server to another server. but i am getting this error. what is this error? are files not in source folder? Source file open failed. Error= 2 Regards, Balamurgan (1 Reply)
Discussion started by: krbala1985
1 Replies

7. Red Hat

rpmdb open failed

Hi, # yum --skip-broken -y update rpmdb: Thread/process 6657/3078387392 failed: Thread died in Berkeley DB library error: db3 error(-30974) from dbenv->failchk: DB_RUNRECOVERY: Fatal error, run database recovery error: cannot open Packages index using db3 - (-30974) error: cannot open... (3 Replies)
Discussion started by: sef alislam
3 Replies

8. Shell Programming and Scripting

How to find out list of all proccess which are running on unix servers from last two days.

Hi All, I have a requirment, i need to get the list of all the process which are running from last two days on my unix server and also to put this list into an another file. i am giving you a sample example : $ ps -ef UID PID PPID C STIME TTY TIME CMD (1 Reply)
Discussion started by: akshu.agni
1 Replies

9. UNIX for Beginners Questions & Answers

Rdesktop - ERROR: Failed to open keymap en-us

I just updated my rdesktop to 1.8.3 from source ( on Slackware 11 ) and had troubles with arrow keys/page up/page down not working. I see this on the console: ERROR: Failed to open keymap en-us The fix is a permission change. I initially looked at /usr/share/rdesktop/keymaps and everything... (1 Reply)
Discussion started by: agentrnge
1 Replies

10. Shell Programming and Scripting

Linux open failed: No such file or directory error

Hi, The below commands works fine on serverB . /etc/profile; cd /export/home/user2/utils/plugin/ ./runme.shHowever, when i run the same commands from serverA it fails $ ssh -q user2@serverB ". /etc/profile; cd /export/home/user2/utils/plugin; ./runme.sh"Output Error: Please find the below... (8 Replies)
Discussion started by: mohtashims
8 Replies
LIBBASH(7)							  libbash Manual							LIBBASH(7)

NAME
libbash -- A bash shared libraries package. DESCRIPTION
libbash is a package that enables bash dynamic-like shared libraries. Actually its a tool for managing bash scripts whose functions you may want to load and use in scripts of your own. It contains a 'dynamic loader' for the shared libraries ( ldbash(1)), a configuration tool (ldbashconfig(8)), and some libraries. Using ldbash(1) you are able to load loadable bash libraries, such as getopts(1) and hashstash(1). A bash shared library that can be loaded using ldbash(1) must answer 4 requirments: 1. It must be installed in $LIBBASH_PREFIX/lib/bash (default is /usr/lib/bash). 2. It must contain a line that begins with '#EXPORT='. That line will contain (after the '=') a list of functions that the library exports. I.e. all the function that will be usable after loading that library will be listed in that line. 3. It must contain a line that begins with '#REQUIRE='. That line will contain (after the '=') a list of bash libraries that are required for our library. I.e. every bash library that is in use in our bash library must be listed there. 4. The library must be listed (For more information, see ldbashconfig(8)). Basic guidelines for writing library of your own: 1. Be aware, that your library will be actually sourced. So, basically, it should contain (i.e define) only functions. 2. Try to declare all variables intended for internal use as local. 3. Global variables and functions that are intended for internal use (i.e are not defined in '#EXPORT=') should begin with: __<library_name>_ For example, internal function myfoosort of hashstash library should be named as __hashstash_myfoosort This helps to avoid conflicts in global name space when using libraries that come from different vendors. 4. See html manual for full version of this guide. AUTHORS
Hai Zaar <haizaar@haizaar.com> Gil Ran <ril@ran4.net> SEE ALSO
ldbash(1), ldbashconfig(8), getopts(1), hashstash(1) colors(1) messages(1) urlcoding(1) locks(1) Linux Epoch Linux
All times are GMT -4. The time now is 10:20 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy