9 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
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
2. Shell Programming and Scripting
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)
Discussion started by: atanubanerji
2 Replies
3. Shell Programming and Scripting
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)
Discussion started by: lalitpct
2 Replies
4. Shell Programming and Scripting
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)
Discussion started by: Nick1097
2 Replies
5. Shell Programming and Scripting
Hello,
I have Individual function in my shell script ,
Function1
{
Master activities
}
Function2
{
Sub activities 1
}
Function3
{
Sub activities 2
}
… (2 Replies)
Discussion started by: Shanks
2 Replies
6. Shell Programming and Scripting
Hi
I have the following script :
#!/bin/ksh
#################### Function macAddressFinder ########################
macAddressFinder()
{
`ifconfig -a > ipInterfaces`
`cat ipInterfaces`
}
#######################################################################
#
#
print... (2 Replies)
Discussion started by: presul
2 Replies
7. Shell Programming and Scripting
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)
Discussion started by: Vabiosis
3 Replies
8. UNIX for Dummies Questions & Answers
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)
Discussion started by: CAGIRL
5 Replies
9. Shell Programming and Scripting
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)
Discussion started by: alex_5161
5 Replies