Hi,
I have a situation where I have to specify a different value to an awk command, I beleive i have the gist of this done, however I am not able to get this correct. Here is what I have so far
echo $id
065859555
This value occurs in a "pipe" delimited file in postition 8. Hence I would... (1 Reply)
Dear All,
Can anybody explain me how to pass the variable value to command argument which will execute in remote machine.
example..
test="test-123.dbf"
how can i pass this value to command ls -l for remote machine?
I tried to do like this way
ssh root@remote 'ls -l... (2 Replies)
Hi,
I have 1. lappy
2. server A
3. server B
Now, what i need is to run a command from lappy that will sftp a file from server A to server B.
Please guide me to achieve this.
-akash (1 Reply)
I'm trying to pass there values from the present server to the remote server. here is the below code.
function abc() {
export a=$1
export b=$2
export c="$3"
export d="$4"
#servers
Servers=$(echo server40{1..3}p.s.com)
for host in ${Servers};
do
#server login
ssh $host... (4 Replies)
Can anyone help how to create a variable in remote server using shell script. i am connecting to remote server through ssh and creating a variable and assigning the value, but nothing is displayed when i run the script
Here is my script
ssh hostname <<EOF
a=10
echo $a
EOF (1 Reply)
I am writing a script where I need awk to test if two columns are the same and shell to do something if they are or are not.
Here is the code I'm working with:
@ test = 0
...
test = `awk '{if($1!=$2) print 1; else print 0}' time_test.tmp`
#time_test.tmp holds two values separated by a space... (3 Replies)
sqlplus -s $USER_ID@$SID/$PWD<<EOF>sql_1.txt
set feedback off
set heading off
select 114032 as c_1 from dual ;
EOF
for i in `cat sql_1.txt`
do
sh script_1.sh $i
Currently i am passing one column value to the single unix variable.
How can i pass the values from 2... (2 Replies)
Hello Every one!!
I am trying to write a shell script which will connect to a remote server and execute scripts which are at a certain path in the remote server.
Before this I am using a sudo command to change the user.
The place where I am stuck is, I am able to connect to the... (6 Replies)
I have a script, which connecting to remote server and first checks, if the files are there by timestamp. If not I want the script exit without error. Below is a code
TARFILE=${NAME}.tar
TARGZFILE=${NAME}.tar.gz
ssh ${DESTSERVNAME} 'cd /export/home/iciprod/download/let/monthly;... (3 Replies)
I have a variable called $a1 which maps to something like "http://servername proxy1 count http" and a lots of entries in a file on remote server.
If I have the following in my .sh script:
sed -i "\%$a1%d" mylog.txtthe line is deleted from mylog.txt. Great.
I'm trying now to remvoe this from a... (3 Replies)
Discussion started by: say170
3 Replies
LEARN ABOUT CENTOS
dblink_connect_u
DBLINK_CONNECT_U(3) PostgreSQL 9.2.7 Documentation DBLINK_CONNECT_U(3)NAME
dblink_connect_u - opens a persistent connection to a remote database, insecurely
SYNOPSIS
dblink_connect_u(text connstr) returns text
dblink_connect_u(text connname, text connstr) returns text
DESCRIPTION
dblink_connect_u() is identical to dblink_connect(), except that it will allow non-superusers to connect using any authentication method.
If the remote server selects an authentication method that does not involve a password, then impersonation and subsequent escalation of
privileges can occur, because the session will appear to have originated from the user as which the local PostgreSQL server runs. Also,
even if the remote server does demand a password, it is possible for the password to be supplied from the server environment, such as a
~/.pgpass file belonging to the server's user. This opens not only a risk of impersonation, but the possibility of exposing a password to
an untrustworthy remote server. Therefore, dblink_connect_u() is initially installed with all privileges revoked from PUBLIC, making it
un-callable except by superusers. In some situations it may be appropriate to grant EXECUTE permission for dblink_connect_u() to specific
users who are considered trustworthy, but this should be done with care. It is also recommended that any ~/.pgpass file belonging to the
server's user not contain any records specifying a wildcard host name.
For further details see dblink_connect().
PostgreSQL 9.2.7 2014-02-17 DBLINK_CONNECT_U(3)