10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have worked on multiple scenarios to execute remote script via ssh.
This problem I am not able to resolve.
2 linux hosts. Server1, Server2
on Server1 I have script called ~/scripts/start_standalone.sh
XXXX
cd $JBOSS_HOME
NODENAME=xyz; IP_ADDR=`hostname`; MGMT_IPADDR=`hostname`;... (3 Replies)
Discussion started by: oraclermanpt
3 Replies
2. Shell Programming and Scripting
Hi All,
Im trying to find the count of process running on remote server using SSH.
Below command dosen't work.
ssh -q user@host "ps -ef | grep "pattern" | grep -v 'grep' | awk '{print $2}'|wc -l"
But below command works.
ssh -q user@host "ps -ef | grep "pattern" | grep -v... (1 Reply)
Discussion started by: Girish19
1 Replies
3. Shell Programming and Scripting
Hi All,
I have a file say, sample.txt
Source Name: xxx
Department|Revenue
1001|3252
1002|3345
I am using the above file in one of my script. I need to read from Line 3 of the above the file and do some process.
My script has a code:
awk 'NR > 2' sample.txt | while read Dep; do... (9 Replies)
Discussion started by: machomaddy
9 Replies
4. Shell Programming and Scripting
Hi,
I'm tryin to write a script that will collect information about a remote servers, put them into variables and print them to screen.
# /usr/bin/bash
ls $1 > /dev/null 2>/dev/null
if
then
echo "$1 is file"
for server in $(cat $1)
do
# echo $server
... (5 Replies)
Discussion started by: moshesa
5 Replies
5. UNIX for Dummies Questions & Answers
Hi All,
I am trying to execute a command using ssh as below.
ssh user123@servername "which ctmcontb"
It is gving the error as below
no ctmcontb in /usr/bin /usr/sbin /opt/sysadm/bin
Not sure from where the PATH is getting picked up.
But When I login direclty to the server I am... (5 Replies)
Discussion started by: anilreddy103
5 Replies
6. Shell Programming and Scripting
Hi
I am trying to send a command over ssh with a parameter but the shell fails to expand the command properly any ideas what am i doing wrong with this.
This is ssh on AIX
for i in 71 72 73 74 75 do
for server in server1 server2 do
somestr="Some String"
echo "$server... (3 Replies)
Discussion started by: xiamin
3 Replies
7. Shell Programming and Scripting
I'm writing a script which is meant to ssh into a remote machine, sed a file there, and write the output to a new file on the remote machine. Obviously the easy way to do this is to write and execute the script on the remote machine, but I'm trying to do this all via ssh since I like to keep and... (4 Replies)
Discussion started by: maethlin
4 Replies
8. Shell Programming and Scripting
I have a server that receives backup files from several servers. Each server has its own directory to scp their files into, some of the files are received as .tar files and need to be compressed before being dumped. When the scp of the tar file is complete a file named 'flag' is also sent to... (2 Replies)
Discussion started by: thumper
2 Replies
9. Shell Programming and Scripting
Hi,
I'm running glance ussing ssh from a "HP-UX" machine for a Sun machine.
Here is a sample code:-
x:- HP-UX
y:- Sun
Extracting a value from glance outuput.
ssh x@y "/opt/perf/bin/glance -f -adviser_only -iterations 2 -maxpages 1 > glance.op ; echo `head -1 glance.op | a
wk '{print... (0 Replies)
Discussion started by: bishweshwar
0 Replies
10. UNIX for Advanced & Expert Users
Hi, How do I get all my profile settings when connecting with ssh? (5 Replies)
Discussion started by: rein
5 Replies