Sponsored Content
Top Forums UNIX for Beginners Questions & Answers Bash - here document on RHEL 6.8 and 6.9 servers aren't working Post 303040564 by jim mcnamara on Thursday 31st of October 2019 04:09:47 PM
Old 10-31-2019
Plus, bash creates a subprocess (different from ksh) on the right side of a pipe, meaning any changes to variables in the statement on the right are not returned to the parent. This changed with bash 4.2, so it may be what you are seeing with v6 versus v7. Check the listpipe bash option help for more information. But I think ChublerXL has a solid answer.

PS:
Code:
EOFSSH
        )
EOFREAD

I do not see the the opening ( in your example. Generates an error for me.
This User Gave Thanks to jim mcnamara For This Post:
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

here document not working

I tried doing ftp myhost <<HERE username password quit HERE but it doesnt work. Why? When I do ftp host, I always get prompted for username, and once I type that in I get prompted for password. But when I try doing it from here document it freezes. (2 Replies)
Discussion started by: JamesByars
2 Replies

2. Red Hat

Who can give me a document for configure nagios on RHEL 5

Who can give me a document for configure nagios on RHEL 5,thanks . (1 Reply)
Discussion started by: zhengsenlin
1 Replies

3. Red Hat

cfengine / puppet for rhel servers

Hello all, I am planning to deploy a configuration / auditing software package for about 100 new nodes that we are planning to install. I am hearing many good things in regards to cfengine and puppet. Can someone shed some light in regards to these solutions? Thanks, jaysunn (1 Reply)
Discussion started by: jaysunn
1 Replies

4. Shell Programming and Scripting

sudo inside a here document not working

Have a sudo statement inside of a here document. It prompts me for a password, but doesnt wait for me to enter my password. Is there a way I can use the command without sudo or anyway that I can enter the password correctly? Eg : while read remotehost do ssh -t $2@$remotehost <<REMOTE... (13 Replies)
Discussion started by: mnanavati
13 Replies

5. Shell Programming and Scripting

RHEL - Shell Script not working

Hello Unix Mates I have a problem my script is not working, can anyone tell what is rung with it? #!/bin/sh wget "http://download.divx.com/labs/divx611-20060201-gcc4.0.1.tar.gz" tar zxf divx611-20060201-gcc4.0.1.tar.gz ./divx611-20060201-gcc4.0.1/install.shError: -2010-11-28 21:25:06-- ... (1 Reply)
Discussion started by: camper
1 Replies

6. Red Hat

RHEL 6 plain telnet & ftp servers

I am being pushed from AIX onto RHEL 6 and after our first 'chuck it on' install, I have a problem. Where is the old (okay insecure) telnet & ftp server? I know that they are probably regarded as archaic now, but the source servers do not have the SSH tools, so I've got to somehow transfer the... (4 Replies)
Discussion started by: rbatte1
4 Replies

7. Red Hat

Network Teaming not working in RHEL/CentOS 7

I was testing Networking Teaming (activebackup) with a VM hosted on VmWare Workstation and VirtualBox, and the result is, if the active interface is down, the system is not using the backup interface. Tested on both CentOS / RHEL 7 Please find below the command I have used to configure teaming.... (0 Replies)
Discussion started by: atanubanerji
0 Replies

8. Red Hat

RHEL 7.1 autofs permissions do not match NFS servers

RHEL 7.1 client using autofs to mount a NIS map of home directories being exported by a Solaris 10x86 nfs server. The owner and group are correct on the NFS server, but on the RHEL client, the owner and group end up being nobody nobody. The USERS and GROUPS are NIS maps as well. They are... (2 Replies)
Discussion started by: mrmurdock
2 Replies

9. UNIX for Advanced & Expert Users

Syslog-ng not working not collecting logs on rhel

Hi, I need help on syslog-ng on RHEL 7.2. It is working as expected. As per configuration, it is supposed to create authlog, messages and xymessages daily in respective folder of date. But I can see only messages file and that is also not updating well. # ps -ef | grep -i syslog root 22954... (1 Reply)
Discussion started by: solaris_1977
1 Replies
RBASH(1)						      General Commands Manual							  RBASH(1)

NAME
rbash - restricted bash, see bash(1) RESTRICTED SHELL
If bash is started with the name rbash, or the -r option is supplied at invocation, the shell becomes restricted. A restricted shell is used to set up an environment more controlled than the standard shell. It behaves identically to bash with the exception that the follow- ing are disallowed or not performed: o changing directories with cd o setting or unsetting the values of SHELL, PATH, ENV, or BASH_ENV o specifying command names containing / o specifying a file name containing a / as an argument to the . builtin command o specifying a filename containing a slash as an argument to the -p option to the hash builtin command o importing function definitions from the shell environment at startup o parsing the value of SHELLOPTS from the shell environment at startup o redirecting output using the >, >|, <>, >&, &>, and >> redirection operators o using the exec builtin command to replace the shell with another command o adding or deleting builtin commands with the -f and -d options to the enable builtin command o using the enable builtin command to enable disabled shell builtins o specifying the -p option to the command builtin command o turning off restricted mode with set +r or set +o restricted. These restrictions are enforced after any startup files are read. When a command that is found to be a shell script is executed, rbash turns off any restrictions in the shell spawned to execute the script. SEE ALSO
bash(1) GNU Bash-4.0 2004 Apr 20 RBASH(1)
All times are GMT -4. The time now is 03:01 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy