Sponsored Content
Top Forums Shell Programming and Scripting Shell script help to execute ssh remote commands Post 302886667 by Y.balakrishna on Monday 3rd of February 2014 06:04:30 AM
Old 02-03-2014
Hi Robin,

Yes,I'm calling .profile and executing ssh command in one line but as per my experience i've to include .profile in single quotes only then it works but otherway around in dobule quotes variables are not getting expanded because of single quotes.

I've tried even simpler. As i said above problem with single quotes and double quotes Smilie

Code:
stop=`$COMMON_TOP/admin/scripts/$CONTEXT_NAME/adcmctl.sh stop apps/$AppsPass`
ssh -q -o BatchMode=yes -o PasswordAuthentication=no XXXX@XXXXXX '. ~/.profile 2>/dev/null; "${stop}"'

./test.sh: line 2: /admin/scripts/XXXXXXXX/adcmctl.sh: No such file or directory

I've fixed Admin_scripts_home spelling already sorry that was a typo above.

Regards
Bala

Last edited by Y.balakrishna; 02-03-2014 at 07:13 AM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

how to execute shell commands in awk script?

Greetings Friends, Suppose I wish to invoke some shell level commands inside an awk script how to do that? say I wish to use : "wc" on a record to count number of characters in a record Any clues? Thanks, Rishi (1 Reply)
Discussion started by: RishiPahuja
1 Replies

2. Shell Programming and Scripting

Can BASH execute commands on a remote server when the commands are embedded in shell

I want to log into a remote server transfer over a new config and then backup the existing config, replace with the new config. I am not sure if I can do this with BASH scripting. I have set up password less login by adding my public key to authorized_keys file, it works. I am a little... (1 Reply)
Discussion started by: bash_in_my_head
1 Replies

3. Shell Programming and Scripting

Execute ssh commands through bash script

Hi all! I am trying to write a script that will check if a certain directory is available at several different nodes and then do stuff in it ..... On the beginning of the script I give as a variable the directory and the number of the nodes and then I loop like this: for... (3 Replies)
Discussion started by: idet2
3 Replies

4. UNIX for Dummies Questions & Answers

how to stay in remote shell after executing commands in ssh?

the ssh calling convention: ssh <server> If I put commands in the section, ssh will execute them immediately after logging in and return to local shell. I want to stay in the remote shell after executing these commands. How can I achieve this? Thanks for all. (1 Reply)
Discussion started by: hplonlien
1 Replies

5. Shell Programming and Scripting

Using ssh to execute a remote script in the background

Help please!! I want to use ssh to execute a remote exe and while it's running I want to query for the process ID of the exe (2 different ssh commands) 1. sshpass -p "<passwd>" ssh -f -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no root@<ipaddress> nohup /tmp/mmds_asyn & 2.... (0 Replies)
Discussion started by: rvompoluTMW
0 Replies

6. Shell Programming and Scripting

bash script to execute a command remote servers using ssh

Hello, I am running into few issues, please suggest me what I am missing. I am running this script on a linux host. Main idea of this script is to, login to each host via ssh and get uid of user, service user that I trying to run this script, has already deployed ssh keys and provide sudo... (8 Replies)
Discussion started by: bobby320
8 Replies

7. Shell Programming and Scripting

Execute shell script on remote machine

I want to execute a shell script(set of commands) on remote machine and that script takes input from text file(local machine). Please refer below: ssh user@hostname 'bash -s'< ./test.sh file.txt But i got the error file.txt doesn't exist. Can anyone help me on this. Content of test.sh: ... (2 Replies)
Discussion started by: manishtri88
2 Replies

8. Shell Programming and Scripting

How to execute application commands with shell script?

Hi Friends, We have a application "getstatus" which needs to run on application prompt. But it is not working with shell script. Example: Unix Root Prompt# execute "crp" to go to application prompt CRP>getstatus displays output of app health CRP>exit Unix Root Prompt# Script , which... (2 Replies)
Discussion started by: suresh3566
2 Replies

9. Shell Programming and Scripting

How to execute commands on remote server using expect script?

I need to copy python script file to around 100 servers using expect script. 1. Copy script to my user home first(/home/myhome) on each remote server 2. change permissions on copied file to 766. 3. sudo to appuser1 account on remote server. copy script file from my user home to /usr/bin/... (1 Reply)
Discussion started by: kchinnam
1 Replies

10. UNIX for Beginners Questions & Answers

How to execute setDomainEnv.sh in wblogic via ssh on remote server in shell script?

How to execute setDomainEnv.sh in wblogic via ssh on remote server in shell script we execute setDomainEnv.sh manually as . ./setDomainEnv.sh from its location ie /opt/SP/users/domian/bin" My approach is not working. Please advise. #!/bin/bash set -x base="/opt/SP/users/d1/bin"... (5 Replies)
Discussion started by: abhaydas
5 Replies
DateTime::Locale::az_Cyrl_AZ(3) 			User Contributed Perl Documentation			   DateTime::Locale::az_Cyrl_AZ(3)

NAME
DateTime::Locale::az_Cyrl_AZ SYNOPSIS
use DateTime; my $dt = DateTime->now( locale => 'az_Cyrl_AZ' ); print $dt->month_name(); DESCRIPTION
This is the DateTime locale package for Azerbaijani Cyrillic Azerbaijan. DATA
This locale inherits from the DateTime::Locale::az_Cyrl locale. It contains the following data. Days Wide (format) XXXXX XXXXXX XXXXXXXX XXXXXX XXXXXXXX XXXX XXXXXX XXXX XXXXX XXXXX Abbreviated (format) XXXXX XXXXXX XXXXXXXX XXXXXX XXXXXXXX XXXX XXXXXX XXXX XXXXX XXXXX Narrow (format) 1 2 3 4 5 6 7 Wide (stand-alone) XXXXX XXXXXX XXXXXXXX XXXXXX XXXXXXXX XXXX XXXXXX XXXX XXXXX XXXXX Abbreviated (stand-alone) XXXXX XXXXXX XXXXXXXX XXXXXX XXXXXXXX XXXX XXXXXX XXXX XXXXX XXXXX Narrow (stand-alone) 1 2 3 4 5 6 7 Months Wide (format) XXXXXX XXXXXX XXXX XXXXX XXX XXXX XXXX XXXXXX XXXXXXXX XXXXXXX XXXXXX XXXXXX Abbreviated (format) XXXXXX XXXXXX XXXX XXXXX XXX XXXX XXXX XXXXXX XXXXXXXX XXXXXXX XXXXXX XXXXXX Narrow (format) 1 2 3 4 5 6 7 8 9 10 11 12 Wide (stand-alone) XXXXXX XXXXXX XXXX XXXXX XXX XXXX XXXX XXXXXX XXXXXXXX XXXXXXX XXXXXX XXXXXX Abbreviated (stand-alone) XXXXXX XXXXXX XXXX XXXXX XXX XXXX XXXX XXXXXX XXXXXXXX XXXXXXX XXXXXX XXXXXX Narrow (stand-alone) 1 2 3 4 5 6 7 8 9 10 11 12 Quarters Wide (format) 1-ci kvartal 2-ci kvartal 3-cue kvartal 4-cue kvartal Abbreviated (format) 1-ci kv. 2-ci kv. 3-cue kv. 4-cue kv. Narrow (format) 1 2 3 4 Wide (stand-alone) 1-ci kvartal 2-ci kvartal 3-cue kvartal 4-cue kvartal Abbreviated (stand-alone) 1-ci kv. 2-ci kv. 3-cue kv. 4-cue kv. Narrow (stand-alone) 1 2 3 4 Eras Wide eramXzdan XvvXl bizim eramXzXn Abbreviated e.X. b.e. Narrow e.X. b.e. Date Formats Full 2008-02-05T18:30:30 = XXXXXXXX XXXXXX, 5, XXXXXX, 2008 1995-12-22T09:05:02 = XXXX, 22, XXXXXX, 1995 -0010-09-15T04:44:23 = XXXXX, 15, XXXXXXXX, -10 Long 2008-02-05T18:30:30 = 5 XXXXXX , 2008 1995-12-22T09:05:02 = 22 XXXXXX , 1995 -0010-09-15T04:44:23 = 15 XXXXXXXX , -10 Medium 2008-02-05T18:30:30 = 5 XXXXXX, 2008 1995-12-22T09:05:02 = 22 XXXXXX, 1995 -0010-09-15T04:44:23 = 15 XXXXXXXX, -10 Short 2008-02-05T18:30:30 = 08/02/05 1995-12-22T09:05:02 = 95/12/22 -0010-09-15T04:44:23 = -10/09/15 Default 2008-02-05T18:30:30 = 5 XXXXXX, 2008 1995-12-22T09:05:02 = 22 XXXXXX, 1995 -0010-09-15T04:44:23 = 15 XXXXXXXX, -10 Time Formats Full 2008-02-05T18:30:30 = 18:30:30 UTC 1995-12-22T09:05:02 = 09:05:02 UTC -0010-09-15T04:44:23 = 04:44:23 UTC Long 2008-02-05T18:30:30 = 18:30:30 UTC 1995-12-22T09:05:02 = 09:05:02 UTC -0010-09-15T04:44:23 = 04:44:23 UTC Medium 2008-02-05T18:30:30 = 18:30:30 1995-12-22T09:05:02 = 09:05:02 -0010-09-15T04:44:23 = 04:44:23 Short 2008-02-05T18:30:30 = 18:30 1995-12-22T09:05:02 = 09:05 -0010-09-15T04:44:23 = 04:44 Default 2008-02-05T18:30:30 = 18:30:30 1995-12-22T09:05:02 = 09:05:02 -0010-09-15T04:44:23 = 04:44:23 Datetime Formats Full 2008-02-05T18:30:30 = XXXXXXXX XXXXXX, 5, XXXXXX, 2008 18:30:30 UTC 1995-12-22T09:05:02 = XXXX, 22, XXXXXX, 1995 09:05:02 UTC -0010-09-15T04:44:23 = XXXXX, 15, XXXXXXXX, -10 04:44:23 UTC Long 2008-02-05T18:30:30 = 5 XXXXXX , 2008 18:30:30 UTC 1995-12-22T09:05:02 = 22 XXXXXX , 1995 09:05:02 UTC -0010-09-15T04:44:23 = 15 XXXXXXXX , -10 04:44:23 UTC Medium 2008-02-05T18:30:30 = 5 XXXXXX, 2008 18:30:30 1995-12-22T09:05:02 = 22 XXXXXX, 1995 09:05:02 -0010-09-15T04:44:23 = 15 XXXXXXXX, -10 04:44:23 Short 2008-02-05T18:30:30 = 08/02/05 18:30 1995-12-22T09:05:02 = 95/12/22 09:05 -0010-09-15T04:44:23 = -10/09/15 04:44 Default 2008-02-05T18:30:30 = 5 XXXXXX, 2008 18:30:30 1995-12-22T09:05:02 = 22 XXXXXX, 1995 09:05:02 -0010-09-15T04:44:23 = 15 XXXXXXXX, -10 04:44:23 Available Formats d (d) 2008-02-05T18:30:30 = 5 1995-12-22T09:05:02 = 22 -0010-09-15T04:44:23 = 15 EEEd (d EEE) 2008-02-05T18:30:30 = 5 XXXXXXXX XXXXXX 1995-12-22T09:05:02 = 22 XXXX -0010-09-15T04:44:23 = 15 XXXXX Hm (H:mm) 2008-02-05T18:30:30 = 18:30 1995-12-22T09:05:02 = 9:05 -0010-09-15T04:44:23 = 4:44 hm (h:mm a) 2008-02-05T18:30:30 = 6:30 PM 1995-12-22T09:05:02 = 9:05 AM -0010-09-15T04:44:23 = 4:44 AM Hms (H:mm:ss) 2008-02-05T18:30:30 = 18:30:30 1995-12-22T09:05:02 = 9:05:02 -0010-09-15T04:44:23 = 4:44:23 hms (h:mm:ss a) 2008-02-05T18:30:30 = 6:30:30 PM 1995-12-22T09:05:02 = 9:05:02 AM -0010-09-15T04:44:23 = 4:44:23 AM M (L) 2008-02-05T18:30:30 = 2 1995-12-22T09:05:02 = 12 -0010-09-15T04:44:23 = 9 Md (M-d) 2008-02-05T18:30:30 = 2-5 1995-12-22T09:05:02 = 12-22 -0010-09-15T04:44:23 = 9-15 MEd (E, M-d) 2008-02-05T18:30:30 = XXXXXXXX XXXXXX, 2-5 1995-12-22T09:05:02 = XXXX, 12-22 -0010-09-15T04:44:23 = XXXXX, 9-15 MMM (LLL) 2008-02-05T18:30:30 = XXXXXX 1995-12-22T09:05:02 = XXXXXX -0010-09-15T04:44:23 = XXXXXXXX MMMd (MMM d) 2008-02-05T18:30:30 = XXXXXX 5 1995-12-22T09:05:02 = XXXXXX 22 -0010-09-15T04:44:23 = XXXXXXXX 15 MMMEd (E MMM d) 2008-02-05T18:30:30 = XXXXXXXX XXXXXX XXXXXX 5 1995-12-22T09:05:02 = XXXX XXXXXX 22 -0010-09-15T04:44:23 = XXXXX XXXXXXXX 15 MMMMd (MMMM d) 2008-02-05T18:30:30 = XXXXXX 5 1995-12-22T09:05:02 = XXXXXX 22 -0010-09-15T04:44:23 = XXXXXXXX 15 MMMMEd (E MMMM d) 2008-02-05T18:30:30 = XXXXXXXX XXXXXX XXXXXX 5 1995-12-22T09:05:02 = XXXX XXXXXX 22 -0010-09-15T04:44:23 = XXXXX XXXXXXXX 15 ms (mm:ss) 2008-02-05T18:30:30 = 30:30 1995-12-22T09:05:02 = 05:02 -0010-09-15T04:44:23 = 44:23 y (y) 2008-02-05T18:30:30 = 2008 1995-12-22T09:05:02 = 1995 -0010-09-15T04:44:23 = -10 yM (y-M) 2008-02-05T18:30:30 = 2008-2 1995-12-22T09:05:02 = 1995-12 -0010-09-15T04:44:23 = -10-9 yMEd (EEE, y-M-d) 2008-02-05T18:30:30 = XXXXXXXX XXXXXX, 2008-2-5 1995-12-22T09:05:02 = XXXX, 1995-12-22 -0010-09-15T04:44:23 = XXXXX, -10-9-15 yMMM (y MMM) 2008-02-05T18:30:30 = 2008 XXXXXX 1995-12-22T09:05:02 = 1995 XXXXXX -0010-09-15T04:44:23 = -10 XXXXXXXX yMMMEd (EEE, y MMM d) 2008-02-05T18:30:30 = XXXXXXXX XXXXXX, 2008 XXXXXX 5 1995-12-22T09:05:02 = XXXX, 1995 XXXXXX 22 -0010-09-15T04:44:23 = XXXXX, -10 XXXXXXXX 15 yMMMM (y MMMM) 2008-02-05T18:30:30 = 2008 XXXXXX 1995-12-22T09:05:02 = 1995 XXXXXX -0010-09-15T04:44:23 = -10 XXXXXXXX yQ (y Q) 2008-02-05T18:30:30 = 2008 1 1995-12-22T09:05:02 = 1995 4 -0010-09-15T04:44:23 = -10 3 yQQQ (y QQQ) 2008-02-05T18:30:30 = 2008 1-ci kv. 1995-12-22T09:05:02 = 1995 4-cue kv. -0010-09-15T04:44:23 = -10 3-cue kv. yyQ (Q yy) 2008-02-05T18:30:30 = 1 08 1995-12-22T09:05:02 = 4 95 -0010-09-15T04:44:23 = 3 -10 Miscellaneous Prefers 24 hour time? Yes Local first day of the week XXXXX SUPPORT
See DateTime::Locale. AUTHOR
Dave Rolsky <autarch@urth.org> COPYRIGHT
Copyright (c) 2008 David Rolsky. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. This module was generated from data provided by the CLDR project, see the LICENSE.cldr in this distribution for details on the CLDR data's license. perl v5.12.5 2013-08-25 DateTime::Locale::az_Cyrl_AZ(3)
All times are GMT -4. The time now is 07:21 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy