09-25-2019
I don't understand what you get and what you're after, and where and how they disagree.
My awk proposal prints a <TAB> char in front of every line, and thus has an "empty first column" if the field separator is <TAB>. Your uniq -c approach will print the count as the first field; additional measures have to be taken to prefix a field separator.
Why don't you print the remote server name just outside the ssh line, prefixing it to the entire output?
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
Hi all,
Have used ftp to transfer files from remote host to localhost.
I was wondering how can I ftp into remote hosts.
for example from a unix box, connect to an external server and then ftp that file into mainframe ? I would like to avoid pulling it to unix box and then ftping to mainframe.... (1 Reply)
Discussion started by: kodermanna
1 Replies
2. UNIX for Dummies Questions & Answers
Hi gurus of unix!!!!, I have a little question. I nedd your helps
The scenarios is the following
I have tree equipment that are installed in different places. I use a carrier to interconnect the equipment.
Some Port's (TCP) need to be open for an application that must be function correctly.
For... (3 Replies)
Discussion started by: andresguillen
3 Replies
3. Debian
Hi,
I've been looking for a way to execute a console program (is in windows but by now I accept the linux way) from a linux machine, but this program has to be opened in the remote side. Linux machine acts only as a "signaling" host. My program has to open the camera in the remote side, but only... (7 Replies)
Discussion started by: zauberberg
7 Replies
4. UNIX for Advanced & Expert Users
Hello forum:
I am curious about some output that I get using an alias <command> on a remote host and I wondered if someone could point me in the right direction.
Symptoms:
Using "ssh -qi /path/to/key root@som.ipa.ddr.ess mail" (or variation of via alias)
only gives a partial textual... (7 Replies)
Discussion started by: Habitual
7 Replies
5. Shell Programming and Scripting
I have a script on about 15 hosts that I need to run for each host whenever I want (not crontab). Problem is, this script takes 5-10 mins to run for each host. Is there a way I can run the script in parallel for all the hosts instead of 1 at a time? Also, I'm remotely running the script on the... (3 Replies)
Discussion started by: mrskittles99
3 Replies
6. Shell Programming and Scripting
so i'm doing something similar to this:
ssh myname@remotehost 'tail -800 /var/log/some.log'
Now, as you can see, this is a lot of data to be passing back and forth over a network.
Is there anything i can do to make the output smaller (zip it on the fly, compress?) and then when the data... (4 Replies)
Discussion started by: SkySmart
4 Replies
7. Shell Programming and Scripting
Hello,
I am trying to login to multiple servers and i have to run multiple loops to gather some details..Could you please help me out.
I am specifically facing issues while running for loops.
I have to run multiple for loops in else condition. but the below code is giving errors in for... (2 Replies)
Discussion started by: mohit_vardhani
2 Replies
8. Shell Programming and Scripting
Dear Folks,
I am trying to read a config file contains ip and port numbers.
i want to read each line of the config file and check ssh connection is happening or not.
Kindly guide.
Config file:
abc@1.2.342 22
abc@1.2.343 22
abc@1.2.344 22
abc@1.2.345 22... (9 Replies)
Discussion started by: sadique.manzar
9 Replies
9. Solaris
Am trying to copy a tar file onto a series of remote hosts and untar it at the destination. Need to do this without having to do multiple ssh.
Actions to perform within a single ssh session via shell script
- copy a file
- untar at destination (remote host)
OS : Linux RHEL6 (3 Replies)
Discussion started by: sankasu
3 Replies
10. Shell Programming and Scripting
Hello all,
i'm trying to create a report by greping a pattern on multiple remote hosts and creta a simple report,
actually i did this, is ther any better way to do this.
#!/bin/bash
for host in `cat RemoteHosts`
do
ssh $host -C 'hostname 2>&1; grep ERROR /var/log/WebServer.log.2019-09-21... (0 Replies)
Discussion started by: charli1
0 Replies
LEARN ABOUT DEBIAN
rlprrc
rlprrc(5) UNIX Reference Manual rlprrc(5)
NAME
rlprrc - remote printing resource file
DESCRIPTION
The rlprrc configuration file is consulted by the remote printing commands (rlpr(1), rlpq(1), and rlprm(1)) to resolve a printqueue or a
hostname. It can be used to either lookup a printqueue (printer) for a given host, or a host for a given printqueue. If both the printer
and the printhost are known, this file is never consulted.
Initially, the remote printing commands look for the file .rlprrc in the user's home directory. If that file cannot be found or does not
provide the information necessary to resolve the query, then the system-wide /etc/rlprrc is consulted (if present). If resolution is still
unsuccessful, the command fails.
There is one entry per line - each line has the format:
hostname: printer1 printer2 ... printerN
Which indicates that host hostname has printers printer1 printer2 ... printerN available. In the case where the remote printing command
knows the host to print to but does not know which printer to use on that host, the first one (printer1 here) will be used.
In the case where the remote printing command knows the printqueue (printer) to print to but does not know what host has that queue, the
last host which has the specified printqueue is used. If this behavior is not acceptable, you can force a certain host to always be used
for a certain printqueue by putting a ! after the printqueue name.
For example, an .rlprrc file containing:
foo.baz.org: litho laserjet4!
foo.bar.org: laserjet4 lineprinter
will always resolve the printqueue laserjet4 to foo.baz.org no matter what other hosts have a printqueue named laserjet4.
The rlprrc file is only consulted in situations where a printqueue or hostname needs to be resolved. It is provided only for convenience
and is not required.
SEE ALSO
rlpr(1), rlpq(1), rlprm(1), rlprd(8)
AUTHOR
meem <meem@gnu.org>
rlpr 2.04 1999/10/28 rlprrc(5)