10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Not sure where the problem is. I can run the script without any issue using the following command.
. /opt/app/scripts/cdc_migration.sh
But it fails with the below error when I try it this way
/opt/app/scripts/cdc_migration.sh
/opt/app/scripts/cdc_migration.sh: line 65: return: can only... (1 Reply)
Discussion started by: svajhala
1 Replies
2. Shell Programming and Scripting
Hi,
I am trying to capture logs of the script in the file as well as on the screen. I have used exec and tee command for this. While using exec command I am getting the correct output in the file but, script output is not getting displayed on the screen as it get executed.
Below is my sample... (14 Replies)
Discussion started by: Prathmesh
14 Replies
3. Shell Programming and Scripting
Hello all,
I am trying to do a tail in a script. But when I quit the tail my script quits also. This is not what I want. I am struggling to get this done.
#!/bin/bash
askFile() {
echo -n "Enter file: "
read FILE
}
doTail() {
tail -F "${1}"
}
askFile
doTail... (4 Replies)
Discussion started by: markdark
4 Replies
4. Shell Programming and Scripting
Hi!
I have a parameter in an existing script, let's call the parameter param1 and the script - script1.
I have another script - script2, which receives param1 and returns a certain value.
I would like this value to be returned inside param1.
There is no problem with script2, it runs... (5 Replies)
Discussion started by: shira
5 Replies
5. Shell Programming and Scripting
HI ,
Is there any way to return a value of variable from shell to perl script.
Code:
===
Perl file
my $diff1=system("sh diff.sh");
my $diff2=system("sh diff1.sh");
I need exit status of below commands
i.e 0 and 1 respectively.
Since in both the cases diff is working so system... (3 Replies)
Discussion started by: srkelect
3 Replies
6. Shell Programming and Scripting
Hi all,
I have two ksh scripts
#sample1.sh
#!/bin/ksh
. ./sample2.sh
echo $fileExist
#sample2.sh
#!/bin/ksh
func()
{
i=1
return $a
}
func
echo $?
Here how should I return the value of sample2.sh back to sample1.sh?
Thanks in advance. (2 Replies)
Discussion started by: gp_singh
2 Replies
7. Shell Programming and Scripting
I use return <value> to return a value from inside an else condition in child script to parent script and i am getting the following error.What is this sourced script? Can I return value to a different script using return statement.
return: can only `return' from a function or sourced script (1 Reply)
Discussion started by: codeman007
1 Replies
8. UNIX for Dummies Questions & Answers
Hi All,
Can anyone please let me know the syntax / how to pick up the Return Code ( RC) from the mailx command and return it to SAS uisng 'system()' function and '${?}'.
I am in a process to send the mail automatically with an attachment to bulk users. I have used 'Mailx' and 'Unencode'... (0 Replies)
Discussion started by: manas6
0 Replies
9. Shell Programming and Scripting
I have 3 scripts
script A - wrapper script to disguise invoker true identity
script B - perform database operation and return a value (either W/H)
-> return value by echoing the result
script C - use script A to mask as the database owner then invoke script B to retrieve the value ... (1 Reply)
Discussion started by: mpang_
1 Replies
10. Shell Programming and Scripting
Hi,
I am trying to return a value from child script to a parent script just as a function does.
The child script will look for a file and if exists will return 1 else 0.
I need to capture the status 1 from child script in the parent script and proceed further. if 0, i need not do... (1 Reply)
Discussion started by: borncrazy
1 Replies