Is it possible to make function variables local?
I mean for example, I have a script variable 'name' and in function I have declared variable 'name'
I need to have script's 'name' have the same value as it was before calling the function with the same declaration.
The way to preserve a... (5 Replies)
Hi,
I have the following statement which parses a string for me and prints it out:
l_comp="dc000.runksh.test.ksh|
$g_sql/dc0000.runksh_test.sql|new.dat|control.ctl"
echo $l_comp | awk -F"|" '{ for ( i = 1; i <= NF; i++) { print $i; } } '
Rather then printing the data, I would like to... (5 Replies)
Here is the following code :
1.
# gcc -c test firstprog.c
the above command will generate a executable file called "test " in which ever directory it is run.
Assuming It will also return a value.
2. In the below SCRIPT . test is a file generated by compiling a c program... (3 Replies)
Hi
I have the following script :
#!/bin/ksh
#################### Function macAddressFinder ########################
macAddressFinder()
{
`ifconfig -a > ipInterfaces`
`cat ipInterfaces`
}
#######################################################################
#
#
print... (2 Replies)
Hello,
I have Individual function in my shell script ,
Function1
{
Master activities
}
Function2
{
Sub activities 1
}
Function3
{
Sub activities 2
}
… (2 Replies)
Hey, i got this 2 file. When i try to pick option 1, which is test1, it says ./test: test1: not found.
Any idea on how i can fix it?
#!/bin/sh
QUIT=0
`dirname $0`/testfile
while ;
do
testmenu
read option
case $option in
1) test1 ;;
2) test2 ;;
3) echo... (2 Replies)
When i use ssh command to execute local script on remote server , I am unable to do it.
Please let me know how this can be done in ksh
req=abc
dte=ghd
ssh username@hostname "$req $dte" < run_script.sh (2 Replies)
Hello
For HP-UX, ksh shell, is it possible to define functions and call them by another user ? For example
<function_name> ( ) {
command1
command2
}
su - <user> -c <function_name>
Or the only option is defining the user in the function itself as follows -
<function_name> ( )... (2 Replies)
Dear Experts,
I have found this script on internet that can be used to execute local script remotely
#!/bin/bash
# runremote.sh
# usage: runremote.sh localscript remoteuser remotehost arg1 arg2 ...
realscript=$1
user=$2
host=$3
shift 3
# escape the arguments
declare -a args
... (4 Replies)
Discussion started by: mukulverma2408
4 Replies
LEARN ABOUT DEBIAN
hwloc-assembler-remote
HWLOC-ASSEMBLER-REMOTE(1) hwloc HWLOC-ASSEMBLER-REMOTE(1)NAME
hwloc-assembler-remote - Assemble multiple remote host topologies
SYNOPSIS
hwloc-assembler-remote [options] output.xml host1 host2 ...
OPTIONS --ssh <ssh>
Use the given ssh command (and options) to connect to remote hosts.
--lstopo-path <path>
Use the given path as the remote lstopo command when gathering remote topologies. By default, lstopo is taken from the PATH envi-
ronment variable.
--lstopo-opts <opts>
Pass the given lstopo options when gathering remote topologies.
--show Display the resulting topology before exit.
-v --verbose
Verbose messages.
DESCRIPTION
hwloc-assembler-remote is a frontend to hwloc-assembler. It takes care of retrieving the remote nodes' topologies before assembling them
with hwloc-assembler.
EXAMPLES
To assemble three nodes topologies:
$ hwloc-assembler-remote output.xml host1 host2 host3
To assemble the topology of a multi-process MPI job defined as a machinefile:
$ hwloc-assembler-remote output.xml `cat machinefile | sort | uniq`
RETURN VALUE
Upon successful execution, hwloc-assembler-remote returns 0.
hwloc-assembler-remote will return nonzero if any kind of error occurs, such as (but not limited to) failure to parse the command line.
SEE ALSO hwloc(7), lstopo(1), hwloc-assembler(1)1.4.1 Feb 27, 2012 HWLOC-ASSEMBLER-REMOTE(1)