09-17-2019
Not sure I understand your questions / problems.
Of course, you can adapt the "command substitution" $(...) to fit your needs - in fact, you are required to do so as I only gave a proof of concept.
And, the read VAR1 VAR2 ... assigns each individual command line's output to its respective individual variable - did you try that? The way you propose can't be used as those variables used it the one single ssh session would be defined on the remote system and not expandable (not even existent) on your local system.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Dear friends,
i need to connect sftp server from my home directory using script .
Please can anyone help me on this. (1 Reply)
Discussion started by: kittusri9
1 Replies
2. Shell Programming and Scripting
HI,
Can't seem to find anything on the forums to fix this.
I have a file, one line within this will not have a specific string at the end.
I have the string, but need to append it to the specific line which has it missing.
I need to use a variable for this, $string - I am using double... (13 Replies)
Discussion started by: mandriver
13 Replies
3. Shell Programming and Scripting
Hey guys, new problem....im not being able to seperate variables.
the code runs like this...
OPTIONS=$(awk '{print $2}' /etc/fstab}
a=$(zenity --list --text "Mount points selection" --radiolist --column "choice" --column "mountpt" FALSE $OPTIONS); echo $a
Note: the result i get is that... (2 Replies)
Discussion started by: dplate07
2 Replies
4. Shell Programming and Scripting
Hi there
I found the Command to send commands to other servers like:
sv01> ssh user@sv02 'ps -ef'
But I cant use Variables from a script i want to execute on another server like:
sv01> ssh user@sv02 'cd $SCRIPTHOME'
although the variable is set on sv01.
How can I run commands on sv02 with... (2 Replies)
Discussion started by: DarkSwiss
2 Replies
5. UNIX for Dummies Questions & Answers
Hi All,
I need to execute a SQL via shell script and i am connecting to Oracle DB by this way $USERNAME1/$PASSWORD1@$STRING1 and i need to get username, password and string from someother file stored in the Unix Directory. $Username, $Password and $String is stored in File A in Path A and i want... (1 Reply)
Discussion started by: sathish.tn
1 Replies
6. Shell Programming and Scripting
Requirement:
Run a shell script with below inputs
file name
checksum
path
the script should go to multiple servers (around 35) and verify the input cksum and if there is a mismatch display a simple message to the user that cksum verification failed.
host details, user id /... (1 Reply)
Discussion started by: amicableperson
1 Replies
7. UNIX for Advanced & Expert Users
Hi,
I have script1.sh on 3 servers. I want to collect output report generated by them to a single server and append all the reports. Please tell me how can i do this? (2 Replies)
Discussion started by: pratikm23
2 Replies
8. Shell Programming and Scripting
Hello,
I have access to several linux servers (mostly centos based) located in a DC in another country.
from day to day I need to login to each of them to do some work (they dont have gui/window manager installed, I work only from console), or even to just do a check like df -h for disc usage.... (3 Replies)
Discussion started by: MaRiOsGR
3 Replies
9. Shell Programming and Scripting
Hi,
I am trying to complete my bash script in order to find which SSH servers on LAN are still active with the ssh keys, but i am frozen at this step:
#!/bin/bash
# LAN SSH KEYS DISCOVERY SCRIPT
</etc/passwd \
grep /bin/bash |
cut -d: -f6 |
sudo xargs -i -- sh -c '
&& cat... (11 Replies)
Discussion started by: syrius
11 Replies
10. UNIX for Advanced & Expert Users
Greetings Experts,
I am working for a bank client and have a question on connect-direct and SFTP.
We are using Linux RedHat servers. We use connect-direct to transfer (NDM) files from one server to another server. At times, we manually transfer the files using SFTP from one server to another... (2 Replies)
Discussion started by: chill3chee
2 Replies
LEARN ABOUT DEBIAN
cd-hit-para
CD-HIT-PARA.PL(1) User Commands CD-HIT-PARA.PL(1)
NAME
cd-hit-para.pl - divide a big clustering job into pieces to run cd-hit or cd-hit-est jobs
SYNOPSIS
cd-hit-para.pl options
DESCRIPTION
This script divide a big clustering job into pieces and submit jobs to remote computers over a network to make it parallel. After
all the jobs finished, the script merge the clustering results as if you just run a single cd-hit or cd-hit-est.
You can also use it to divide big jobs on a single computer if your computer does not have enough RAM (with -L option).
Requirements:
1 When run this script over a network, the directory where you
run the scripts and the input files must be available on all the remote hosts with identical path.
2 If you choose "ssh" to submit jobs, you have to have
passwordless ssh to any remote host, see ssh manual to know how to set up passwordless ssh.
3 I suggest to use queuing system instead of ssh,
I currently support PBS and SGE
4 cd-hit cd-hit-2d cd-hit-est cd-hit-est-2d
cd-hit-div cd-hit-div.pl must be in same directory where this script is in.
Options
-i input filename in fasta format, required
-o output filename, required
--P program, "cd-hit" or "cd-hit-est", default "cd-hit"
--B filename of list of hosts,
requred unless -Q or -L option is supplied
--L number of cpus on local computer, default 0
when you are not running it over a cluster, you can use this option to divide a big clustering jobs into small pieces, I suggest you
just use "--L 1" unless you have enough RAM for each cpu
--S Number of segments to split input DB into, default 64
--Q number of jobs to submit to queue queuing system, default 0
by default, the program use ssh mode to submit remote jobs
--T type of queuing system, "PBS", "SGE" are supported, default PBS
--R restart file, used after a crash of run
-h print this help
More cd-hit/cd-hit-est options can be speicified in command line
Questions, bugs, contact Weizhong Li at liwz@sdsc.edu
cd-hit-para.pl 4.6-2012-04-25 April 2012 CD-HIT-PARA.PL(1)