Sponsored Content
Top Forums Shell Programming and Scripting what is wrong with this line? Post 302215574 by looza on Wednesday 16th of July 2008 06:55:27 PM
Old 07-16-2008
CPU & Memory what is wrong with this line?

system ("$ssh '$perf_stats' < temp_pipe 2>&1 &");

I need to start and interact with my executable defined by perf_stats on a remote machine but not change my command line to that of the remote machine. temp_pipe is a node created by mknod -f temp_pipe
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Whats wrong with this 5 line script!

Hi #!/bin/sh user=$1 if " -eq 0 ] echo "No" else echo "Yes" fi I'm not quite sure whats wrong with this but I know its something silly. Any ideas? Thanks (9 Replies)
Discussion started by: c19h28O2
9 Replies

2. UNIX for Dummies Questions & Answers

What's wrong with this line: if ${TEST:?} ; then echo empty; fi

I want to print "empty" if $TEST is empty. TEST= if ${TEST:?} ; then echo empty; fi But it doesn't work. What's wrong? (2 Replies)
Discussion started by: meili100
2 Replies

3. Shell Programming and Scripting

Whats wrong with this line?

I have a file $I_FILE that I need to filter and store the 1st and the 9th columns in another file $O_FILE. With this in Perl, system ("awk -F, '{print \$1, \$9}' \$I_FILE | sed '\/^\$\/d' > O_FILE"); I get: 4096045055 The first line in I_FILE is:... (5 Replies)
Discussion started by: looza
5 Replies

4. Shell Programming and Scripting

whats wrong with this line using perl

E:\>perl -00ne 'push @a,"$_\0$ARGV\n";END{print reverse split/\0/ for sort @a}' file1-obj_prof.out.txt file2-obj_prof.out.txt' Can't find string terminator "'" anywhere before EOF at -e line 1. (6 Replies)
Discussion started by: richsark
6 Replies

5. Shell Programming and Scripting

what is wrong with this expr line

It keeps giving me expr syntax error. expr "${etherline }" : ’.*no match found’ 2>&1 >/dev/null Thanks in advance. (1 Reply)
Discussion started by: shadow_boi
1 Replies

6. Shell Programming and Scripting

What's wrong with this command line pls?

I executed the following command and got Arg List too long. find /dir1/dir2/LOG_* -prune -type f -mtime +3 -exec echo {} \; What's that about? (2 Replies)
Discussion started by: bbbngowc
2 Replies

7. Shell Programming and Scripting

SED to delete last word on line...what's wrong?

I have a line that gets pulled from a database that has a variable number of fields, fields can also be of a variable size. Each field has a variable number of spaces between them so there is no 'defined' delimiter. The LastData block is always a single word. What I want to do is delete the... (2 Replies)
Discussion started by: Bashingaway
2 Replies

8. Shell Programming and Scripting

What is wrong with tiny (g)awk line ??

Hi I wish to capitalize the first letter or every word in a text file with: gawk '{$0=gensub(/(\w)(\w*)/,toupper("\\1")"\\2","g");}' file.txtBut it doesn't work...: target: bla test Test TEST yes nO Yes yes restult: bla test Test TEST yes nO Yes yes any idea? thanks (11 Replies)
Discussion started by: louisJ
11 Replies

9. Shell Programming and Scripting

what's wrong with my awk line?

] && { echo "The free mem need to be more than 2G" } (3 Replies)
Discussion started by: yanglei_fage
3 Replies

10. Homework & Coursework Questions

When I run the script, the cursor starts on the wrong line?

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: It's a shell script using a looping logic, trap, tput, if, while. Most of the scripts in this book aren't written... (2 Replies)
Discussion started by: ckleinholz
2 Replies
dsh(1)							      Dancer Tools reference							    dsh(1)

NAME
dsh - Distributed shell, or dancer's shell SYNOPSIS
dsh [-m machinename | -a | -g groupname] [-r remoteshellname] [-c | -w | -i | -F forklimit ] -- commandline DESCRIPTION
dsh executes command remotely on several different machines at the same time. An utility to effectively do a for a in $(seq 1 10); do rsh $a command; done in bourne shell. OPTIONS
The options available are as follows. --verbose | -v Give verbose output of the execution process. --quiet | -q Makes output quieter. --machine | -m [machinename[,machinename]*] Adds machinename to the list of machines that the command is exeuted. The syntax of machinename allows username@machinename where remote shell is invoked with the option to make it of username. From version 0.21.4, it is possible to specify in the format of username@machinename,username@machinename,username@machinename so that multiple hosts can be specified with comma-delimited values. --all | -a Add all machines found in /etc/dsh/machines.list to the list of machines that the specified command is executed. --group groupname | -g groupname Add all machines found in /etc/dsh/group/groupname to the list of machines that the specified command is executed. If groupname is on the form @netgroup then the machines in the given netgroup is used to specify the list of machines to execute on. --file machinefile | -f machinefile Add all machines found in the specified file to the list of machines that the specified command is executed. The file should list one machine specification per line (with the same syntax as the machinename argument). Lines starting with "#" are ignored. From version 0.21.4, Specifying the same machine several times using any of the machine specification options will result in multi- ple invocations merged into one. --remoteshell shellname | -r shellname Execute remote shell shellname as the remote shell. Usually any of "rsh", "remsh" or "ssh" are available --remoteshellopt rshoption | -o rshoption Add one option rshoption to the list of options passed on to the remote shell. --help | -h Output help message and exits. --wait-shell | -w Executes on each machine and waits for the execution finishing before moving on to the next machine. --concurrent-shell | -c Executes shell concurrently. --show-machine-names | -M Prepends machine names on the standard output. Useful to be used in conjunction with the --concurrent-shell option so that the out- put is slightly more parsable. --hide-machine-names | -H Do not prepend machine names on the standard output. --duplicate-input | -i Duplicates the input to dsh process to individual process that are remotely invoked. Needs to have --concurrent-shell set. Due to limitations in current implementation, it is only useful for running shell. Terminate the shell session with ctrl-D. --bufsize | -b [buffer-size in bytes] Sets the buffer size used in replicating input for --duplicate-input option. --version | -V Outputs version information and exits. --num-topology | -N Changes the current topology from 1. 1 is the default behavior of spawning the shell from one node to every node. Changing the num- ber to a value greater than 2 would result in dsh being spawned on other machines as well. --forklimit | -F fork limit Similar to -c with a limit on the number of simultaneous connections. dsh will wait before creating new connection if the limit is reached. Useful when the number of nodes to be accessed is going somewhere above 200, and using -N option is not possible. EXIT STATUS
The first non-zero exit code of child processes is returned, or zero if none returned non-zero exit code. 1 if error is found in command-line specifications. 2 if signal is received from child processes. EXAMPLES
dsh -a w Shows list of users logged in on all workstations. dsh -r ssh -a -- w Shows list of users logged in on all workstations, and use ssh command to connect. (It should be of note that when using ssh, ssh- agent is handy.) dsh -r ssh -m node1 -m node2 -c -- 'echo $HOSTNAME $(cat/proc/loadavg )' Shows the load average of machines node1 and node2. FILES
/etc/dsh/machines.list | $(HOME)/.dsh/machines.list List of machine names to be used for when -a command-line option is specified. /etc/dsh/group/groupname | $(HOME)/.dsh/group/groupname List of machine names to be used for when -g groupname command-line option is specified. /etc/dsh/dsh.conf | $(HOME)/.dsh/dsh.conf Configuration file containing the day-to-day default. BUGS
There should be a dcp for copying files to remote systems. Configuration files should really be able to do something more than it does now. AUTHOR
Junichi Uekawa (dancer@debian.org) Upstream page is available at http://www.netfort.gr.jp/~dancer/software/dsh.html SEE ALSO
rsh(1), ssh(1), remsh(1), dsh.conf(5) Debian-Beowulf/Dancer 2007 Aug 15 dsh(1)
All times are GMT -4. The time now is 02:19 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy