Sponsored Content
Full Discussion: Ssh disturbs while loop
Top Forums UNIX for Beginners Questions & Answers Ssh disturbs while loop Post 303039306 by Soham on Monday 30th of September 2019 08:59:10 AM
Old 09-30-2019
Great. Works perfect. Thank you very much.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Pb in while loop with ssh command

Hi I use the following command to check if my_base is active or not : active_db=`${LOCAL_BIN}/ssh -l ${my_user} ${my_service} "ps -ef | grep ora_smon | grep ${my_base} | sed -e \"s/ */ /g\" | cut -d'?' -f2 | cut -d' ' -f3 | cut -d'_' -f3"` When I use a file listing databases to check them... (1 Reply)
Discussion started by: madmat
1 Replies

2. Shell Programming and Scripting

ssh stops a while loop

The while loop exits (early) when a simple ssh command is run. #!/bin/ksh #set -x #------------------------------------------------------------------------- # Functions Section #------------------------------------------------------------------------- while : do cat list.txt|while read... (1 Reply)
Discussion started by: bkdias26
1 Replies

3. Shell Programming and Scripting

ssh and executing a for loop

Hi all, I am trying to run a script which is expected to do: on the remote machine, There are two directories /export/home/abc1,/export/home/abc2 i am trying to do, ssh SERVERNAME "for i in `ls -l /export/home/abc*|awk '{print $9}'`; do cd $i; ls -l; done" But its not working ,iam... (11 Replies)
Discussion started by: Jartan
11 Replies

4. Shell Programming and Scripting

using ssh with a for loop

How do you do an ssh on a for statement. I have done ssh on individula lines of code before with no problems. #!/usr/bin/ksh cat server_list.txt | while read line do ssh $line "for i in `lslpp -l |grep tsm` do lslpp -Lc $i |grep -v State |tr ':' ',' |awk -F, '{print $2, "," ,... (4 Replies)
Discussion started by: din
4 Replies

5. Shell Programming and Scripting

ssh inside a for loop

Hi, The requirement is to ssh to unix servers and oracle databases, to perform some monitoring activity. I'm using shell script to perfom this. I pass the server details and database to a variable ... SERVERS="SERVER1 SERVER2 SERVER3" DATABASE="DB1 DB2 DB3" for i in $SERVERS do ssh... (2 Replies)
Discussion started by: senthil3d
2 Replies

6. UNIX for Dummies Questions & Answers

ssh and for loop

Hi all, I am facing an issue while trying to access a for loop variable inside ssh. Can anyone please help me with what this issue is, the following is the code that I have -> IMPL_LOG_FOLDERS=(transaction_logs invalid_transaction_logs) sshg3 ftp_id@boxname << EOS for log_folder in... (5 Replies)
Discussion started by: anindyabecs
5 Replies

7. Shell Programming and Scripting

ssh breaks loop

Here is the smallest extract to demonstrate the problem that I experience. #!/bin/bash r=$1 while read ip do if ] ;then x=`ssh $ip echo "$ip"` else x=`echo "$ip"` fi echo $x done << EOF 192.168.8.241 192.168.8.241 EOF # Any IP with public key set (0 Replies)
Discussion started by: ivolvo
0 Replies

8. AIX

Need help on for loop inside ssh

Hi, I am having a file like, #cat file Jun 19 13:08 Jun 19 13:08 Jun 19 13:08 Jun 19 13:14 when I run the below comamnd locally it will work fine, IFS=$'\n'; for i in $(cat file) ;do echo "HI $i" ; done And the output is, HI Jun 19 13:08 HI Jun 19 13:08 HI Jun 19 13:08 HI... (1 Reply)
Discussion started by: sumanthupar
1 Replies

9. IP Networking

Why eth1 with auto dhcp disturbs pppoe over eth0?

Hi, I use ubuntu 16.04 desktop with ufw (default setup + 22, 80, 443 ports open). I connect directly to ISP using pppoe over eth0. I also have eth1 which when disabled the websites are accessible in browser. When starting eth1 with auto dhcp the websites are no longer accessible in browser (give... (3 Replies)
Discussion started by: adrhc
3 Replies

10. Shell Programming and Scripting

Unable to loop with ssh

I read a file (iplist.txt) ine-by-line in a loop which has the list of all the server hostnames. With each hostname read; I do ssh and fire multiple commands to gather information about that systemas shown below. #!/bin/bash while IFS='' read -r line || ]; do echo "Text read from file:... (3 Replies)
Discussion started by: mohtashims
3 Replies
AMSTATUS(8)						  System Administration Commands					       AMSTATUS(8)

NAME
amstatus - display the state of an Amanda run SYNOPSIS
amstatus [--file amdumpfile] [--summary] [--dumping] [--waitdumping] [--waittaper] [--dumpingtape] [--writingtape] [--finished] [--failed] [--estimate] [--gestimate] [--stats] [--locale-independent-date-format] [--config] config DESCRIPTION
Amstatus gives the current state of the Amanda run specified by the config configuration. If there is no active Amanda running, it summarizes the result of the last run. It may also be used to summarize the results of a previous run. See the amanda(8) man page for more details about Amanda. OPTIONS
All options may be abbreviated to the shortest non-ambiguous sub-string. If no options are given, everything is displayed. [--config] config Specify the Amanda configuration you want to display the state for. --file amdumpfile Specify an alternate file instead of the amdump or amflush file. --summary Display a summary of the state of the run. --dumping Display all partitions that are dumping. --waitdumping|wdumping Display all partitions that are waiting to be dumped. --waittaper|wtaper Display all partitions dumped that are waiting to be written to tape. --dumpingtape|dtape Display all partitions that are dumping directly to tape. --writingtape|wtape Display all partitions that are writing to tape. --finished Display all partitions that are dumped and written to tape. --failed|error Display all partitions that failed. --estimate Display all partitions whose estimate is finished. Works only during the estimate phase. --gestimate|gettingestimate Display all partitions whose estimate is not finished. Works only during the estimate phase. --stats|statistics Display statistics about active-time of taper and dumpers. --locale-independent-date-format Output the date in a locale independent format. The format is the same executing: date +'%Y-%m-%d %H:%M:%S %Z' EXIT CODE
The exit code of amstatus is the ORed value of: 0 = success 1 = error 4 = a dle failed 8 = Don't know the status of a dle (RESULT_MISSING in the report) 16 = tape error or no more tape SEE ALSO
amanda(8), amcheck(8), amdump(8), amrestore(8), amadmin(8) The Amanda Wiki: : http://wiki.zmanda.com/ AUTHOR
Stefan G. Weichinger <sgw@amanda.org> Amanda 3.3.3 01/10/2013 AMSTATUS(8)
All times are GMT -4. The time now is 10:02 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy