Sponsored Content
Top Forums Shell Programming and Scripting Aggregate variables bdfore ssh into remote host Post 302888727 by Klashxx on Monday 17th of February 2014 04:52:58 AM
Old 02-17-2014
Not sure if i understood correctly, but this may helps:
Code:
# awk  '{a[$NF]=sprintf("%s%s ",a[$NF],$1)}END{for (i in a){print i,a[i]}}' infile
1.1.1.1 app1 app3 
1.1.1.2 app2 
1.1.1.3 app4

This User Gave Thanks to Klashxx For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

check ssh connection to remote host

I am using KSH and I need to check whether the remote host has been configured with ssh public key. Is there any way we can check inside a script? (6 Replies)
Discussion started by: praveenbvarrier
6 Replies

2. UNIX for Dummies Questions & Answers

Is it possible for a server to be both a remote and client SSH host?

Hi, Not sure if this is possible, I have a server (SERVER1) that is currently set up as a remote SSH host. My client SSH host (SERVER2) is connecting to SERVER1 to scp a file with no password. I now have a need to set up a third server (SERVER3) as a remote SSH host and I need SERVER1 as a... (4 Replies)
Discussion started by: tatchel
4 Replies

3. Linux

Access environment variables on remote host using ssh

How can i access environment variables on remote host using ssh example: # Remote server $ echo $MAIL /var/spool/mail/gacf $ # Local server $ ssh gacf@server1 'echo $MAIL' /var/mail/gacf $ Expected to find: $ ssh gacf@server1 'echo $MAIL' /var/spool/mail/gacf $ (3 Replies)
Discussion started by: brendan76
3 Replies

4. Shell Programming and Scripting

ssh to a remote host

i want a script with expect or perl or shell which will do ssh to remote host...it will take commandline argument and run the script in remote host....... i.e that will be like ./ssh.exp remoteip username passwd /tmp.kk.sh can someone help me on this? (1 Reply)
Discussion started by: Aditya.Gurgaon
1 Replies

5. Shell Programming and Scripting

ssh to remote host and execute command

Hi, could anyone please tell me how to ssh to remote host foo and execute command on it and print the result on local host? Thanks, Paresh (1 Reply)
Discussion started by: masaniparesh
1 Replies

6. Solaris

unable to ssh to remote host

server is ok, I can login on console. however, when I use SSH teachia, there is no repsond. i have check ps-ef | grep ssh, it shows ok. restart ssh too. still not working. Anything else I need to check? # ps -ef | grep ssh root 24706 1 0 Jun 12 ? 0:00... (7 Replies)
Discussion started by: uuontario
7 Replies

7. Shell Programming and Scripting

ssh can't back from remote host during script execution

Hi all I wrote a script to execute a script on several remote hosts, but somehow during the execution of the local script, ssh can't come back from the remote host, so that causes my local script hanging... I use the below command to do the job in the local script, any idea? ssh... (12 Replies)
Discussion started by: bzylg
12 Replies

8. UNIX for Advanced & Expert Users

Help! How to find the local host after few ssh hops to remote host???

I do a ssh to remote host(A1) from local host(L1). I then ssh to another remote(A2) from A1. When I do a who -m from A2, I see the "connected from" as "A1". => who -m userid pts/2 2010-03-27 08:47 (A1) I want to identify who is the local host who initiated the connection to... (3 Replies)
Discussion started by: gomes1333
3 Replies

9. Shell Programming and Scripting

Execute command on remote host via ssh

How should i make the following code working #!/bin/bash INPUTFILE="test.txt" while read STRING; do IP=`host -t A $STRING | awk '{print $NF}'` HOSTNAME=`ssh -oPasswordAuthentication=no -oStrictHostKeyChecking=no $IP "hostname"` echo $HOSTNAME > out.txt done < $INPUTFILE At this moment while... (3 Replies)
Discussion started by: urello
3 Replies

10. IP Networking

SSH to remote host using SOCK5 proxy

I am trying to connect to a remote host C from my node host A. HostA <====> HostB <====> HostC A tunnel has already been formed using SOCKS5 between HostA and HostC. Now I want to SSH from A to C. The SOCKS5 IP us 142.133.132.161 and port 1082. The command I am using is : ssh -L... (1 Reply)
Discussion started by: Junaid Subhani
1 Replies
CAMPING(1)							   User Commands							CAMPING(1)

NAME
camping - small Ruby web framework for MVC type applications SYNOPSIS
camping app1.rb app2.rb... DESCRIPTION
Camping is a web framework which consistently stays at less than 4kb of code. The idea here is to store a complete fledgling web applica- tion (written in Ruby) in a single file like many small CGIs, but to organize it as a Model-View-Controller application like Rails does. You can then easily move it to Rails once you've got it going. Specific options: -h, --host HOSTNAME Host for web server to bind to (default is all IPs) -p, --port NUM Port for web server (defaults to 3301) -d, --database FILE SQLite3 database path (defaults to ~/.camping.db) -C, --console Run in console mode with IRB -s, --server NAME Server to force (mongrel, webrick, console) Common options: -?, --help Show this message -v, --version Show version FILES
~/.camping.db The default database file. SEE ALSO
The Camping website on http://camping.rubyforge.org/. AUTHOR
This manual page was written by Paul van Tilburg <paulvt@debian.org>, for the Debian GNU/Linux system (but may be used by others). camping 2.0 May 2010 CAMPING(1)
All times are GMT -4. The time now is 04:21 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy