10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I would like to execute a commands in four different servers through ssh at a single instance(simultaneously).
Below are the details with examples,
ssh user1@server1 "grep xxxx logs"
ssh user1@server2 "grep xxxx logs"
ssh user1@server3 "grep xxxx logs"
Each statement will take some... (4 Replies)
Discussion started by: Amutha
4 Replies
2. Shell Programming and Scripting
I am trying to execute a piped combination of shell commands inside a perl program.
However, it is not working as desired.
This is my program, i am trying to print only filenames from the output of ls -l
$ cat list_test
#!/usr/bin/perl -w
use strict;
my $count=0;
my @list=`ls -l|awk... (4 Replies)
Discussion started by: sam05121988
4 Replies
3. Shell Programming and Scripting
Hello
In the shell script we have a FTP command like below
ftp -n -v -q winftp.principal.com >/infa/datafiles/GRP/Scripts/ftp_from_infa_dvcn.log<<END_SCRIPT
quote USER $FTP_USER
quote PASS $FTP_PASS
ascii
lcd $FTP_LOCALDIR
cd $FTP_FLDR
put $FTP_FILE
bye
exit
If i... (1 Reply)
Discussion started by: Pratik4891
1 Replies
4. Shell Programming and Scripting
Hi All,
I am trying to execute a shell script containg awk commands. But unable to do so. Below is my script. Please help.
The name of the script is scan.sh and I have tried executing it using the command sh scan.sh
It is giving an error which reads like:
awk:syntax error near line 7... (3 Replies)
Discussion started by: misb
3 Replies
5. UNIX for Dummies Questions & Answers
the ssh calling convention:
ssh <server>
If I put commands in the section, ssh will execute them immediately after logging in and return to local shell. I want to stay in the remote shell after executing these commands. How can I achieve this?
Thanks for all. (1 Reply)
Discussion started by: hplonlien
1 Replies
6. Shell Programming and Scripting
I need to execute a command to run my script several times with varying parameters
perl ex.pl -b 130198 -e 130884 -c plot plot.txt 1_plot.txt
perl ex.pl -b 1345 -e 1308 -c plot plot.txt 2_plot.txt
perl ex.pl -b 1345567 -e 130898 -c plot plot.txt 3_plot.txt
.
.
.
100's of excutions
... (2 Replies)
Discussion started by: Lucky Ali
2 Replies
7. UNIX for Dummies Questions & Answers
We have two processes, one which copies a control file into a folder and another which is polling this folder and reading the control files.
Sometimes they clash and the reader fails because the copy is still happening.
We have been told that we should change the copy to a move because the... (1 Reply)
Discussion started by: sbarnes
1 Replies
8. Shell Programming and Scripting
Hi,
I want to run these two commands one after the other.
awk 'BEGIN {OFS="\t"} {print $2}'
sort -u
rather than typing awk 'BEGIN {OFS="\t"} {print $2}' file1 > file2, then sort -u file2 > file3. Is it possible to run both commands on file1 then get output file3?
Its kinda hard for... (5 Replies)
Discussion started by: kylle345
5 Replies
9. Shell Programming and Scripting
Hey there,
I am trying to pass a command as argument to a function.
The command shows up in $1.
Now I want to execute this command, but if I do a $1
./sample
"bla/blaprintf: warning: ignoring excess arguments, starting with `bla/bla'
The code is :
#!/bin/ksh
fn()
{
$1
}
fn... (3 Replies)
Discussion started by: shriyer
3 Replies
10. UNIX for Advanced & Expert Users
I have to execute some commands after executing one command ( cleartool setview Tagname)
Problem is that I write commands in script like this.
echo "test1"
cleartool setview tagname
echo "test2"
copy file1 file2
echo "test3"
but when I execute script.
Output
---------
test1
If I... (1 Reply)
Discussion started by: udaykishore
1 Replies