Sponsored Content
Operating Systems AIX Remote Script command logging question Post 302732049 by Corona688 on Friday 16th of November 2012 12:12:33 PM
Old 11-16-2012
See also useless use of backticks. If the list of hosts grows too large your code will malfunction, but this code never will:

Code:
while read node
do
...
done < hostlist

Note you may want to < /dev/null for ssh, so that it doesn't eat lines from stdin inside the loop.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Delay when logging in remote

Hello again! When I log in to my computer (Ultra 5 running Solaris 8) from a pc (FTP or Telnet) I have to wait forever (about 30 seconds) before I can log in. Is this some kind of security thing? Can I turn it of? How? Anders (8 Replies)
Discussion started by: alfabetman
8 Replies

2. Shell Programming and Scripting

logging to remote server

Hi, I want to log-in to a remote server using shell script. The server requires the following while allowing a connection: username password one - letter authorisation. How can i implement this in my script? thanks, abey (6 Replies)
Discussion started by: abey
6 Replies

3. Shell Programming and Scripting

Question about how to execute command on the Sorias from the remote.

Hi, all please help me this time@@! I want to execute the shell on the server from the remote. How can I do that and save the return code in the variable? I want to execute the script on the ten servers at the same time... I'd like to find a fast method to solve it! Thanks in advance! (3 Replies)
Discussion started by: GCTEII
3 Replies

4. Shell Programming and Scripting

Problem with logging into remote host

Hi All, I am using a script for remotely logging into a rhost using telnet and shutdown a server. The script is as follows. IP = 10.24.12.23; export IP UNAME = username ; export UNAME PWD = password; export PWD CRDIR = /etc/rc.d/init.d ; export CRDIR echo "logging into remote... (4 Replies)
Discussion started by: patil_reddy
4 Replies

5. Shell Programming and Scripting

Logging Remote SSH command (cannot log a java output)

Hi all I'm creating a script that runs a few commands on some boxes and everything can be logged EXCEPT the java -version command, there doesn't seem to be any output... Can anyone help explain why this does not work? Do I need to do something extra to append the output from the java... (3 Replies)
Discussion started by: Keepcase
3 Replies

6. Solaris

Logging remote telnet sessions via script

Hi, My requirement - for security purpose - I want all root logins to my solaris servers are done by a script kept in a separate unix box. This script will telnet into remote solaris server with root user and log every session via log file. Now my purpose is to log every telnet session... (3 Replies)
Discussion started by: rahul_jain250
3 Replies

7. SCO

sco remote logging problem

Hello, I am trying to write log from sco box to a remote host. We already have that setting working for linux server using syslog. With this setting(on LINUX) *.* @remote-host for sco I have this *.debug /usr/adm/syslog *.* ... (3 Replies)
Discussion started by: polestar
3 Replies

8. Shell Programming and Scripting

Executing scipts after logging into a remote host using shell script

Hi All, Sorry if it is a duplicate post. I have not got any reference about this anywhere. I looked at the posts described in SSH - Passing Unix login passwords through shell scripts - Linux / UNIX Forum and it helped me till the point to connect to the host and executing the basic commands.... (3 Replies)
Discussion started by: RSC1985
3 Replies

9. Shell Programming and Scripting

Check/get the exit status of a remote command executed on remote host through script

Geeks, Could you please help me out in my script and identify the missing piece. I need to check/get the exit status of a remote command executed on remote host through script and send out an email when process/processes is/are not running on any/all server(s). Here's the complete... (5 Replies)
Discussion started by: lovesaikrishna
5 Replies

10. Shell Programming and Scripting

Execute ssh command with additional terminal command to any remote user not working script

Hello i am having an issue with bash script and this is the code now=$(cat hosts1.txt | awk '{print $2;}') while read n ;do ssh root@$now 'useradd test1; echo -e "test1\ntest1" | passwd test1 && echo "test1 ALL=(ALL:ALL) ALL" >> /etc/sudoers' When i execute only part with cat, it... (8 Replies)
Discussion started by: tomislav91
8 Replies
PREFIX(1)                                                     General Commands Manual                                                    PREFIX(1)

NAME
prefix - Script that allows you to reconfigure environment variables for multiple installations of a set of software installed on the same machine SYNOPSIS
prefix DESCRIPTION
It is assumed that the software for each installation is all under a single directory whose name is assigned to an environment variable called PREFIX. This arrangement of enabling multiple installations of software on a single machine is useful at many times. On a single server, it can provide for development, test, and production installations of software. Alternatively, on development servers, it allows for multiple development "sandboxes", one for each developer. On production servers, it allows for multiple versions of the production software to be installed. One might be the currently running software, one the previous software kept online as a fall-back, and one a new release of software wich is scheduled to be brought online soon. There are three usages of the prefix script: (1) The interactive usage should be placed as the last line of a user's ".profile". The user must be running the Korn shell (ksh) or the Bourne Again shell (bash). The user is prompted to enter one of the known PREFIX locations, specified in the $HOME/.prefixes file or the /etc/prefixes file. During configuration, the $PREFIX/.prefixrc file is sourced in order to accomplish environment-specific configurations. (2) The non-interactive user configuration does not consult $HOME/.prefixes or /etc/prefixes or prompt the user, but merely configures the environment in accordance with the cmd line argument. (3) The batch command usage is mainly for running commands from cron or running commands in another environment without changing to that environment. Usage (1): . prefix (sets up environment) (2): . prefix <prefix> (non-interactive setup) (3): prefix <prefix> <cmd> <args> (runs cmd configured for PREFIX) This manual page was written for the Debian distribution because the original program does not have a manual page. AUTHOR
Prefix was written by Stephen Adkins <spadkins@gmail.com>, and is part of the App-Options distribution. This manual page was written by Jotam Jr. Trejo <jotamjr@debian.org.sv>, for the Debian systems (but may be used by others). Oct 07, 2010 PREFIX(1)
All times are GMT -4. The time now is 01:38 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy