I write the variables to a temp file. Then, my other scripts and programs can simply read the test file to determine any variables.
If you write to a temp file similar to the folowing file my_var.tmp
Then you could in other scripts do a:
Although not perfect, it does allow another way to share variables.
hi everybody!
i am running this ksh script for replacing a set of strings by another set of new ones. i am getting both these from a file.
also, the strings that i want to replace, are sub-strings(can occur more than once in each chunk) in a big chunk of data that i have bulk-copied(bcp utility)... (1 Reply)
I can't figure out how to access variables that are stored in a separate file. Can someone let me in on the secret? Please, and thank you.
-Kevin (7 Replies)
Hello,
I wonder if it is possible to pass and use variables from shell environment into sed or awk. I am trying to achieve something similar to the following using sed or awk:
var=some_regular_expression
grep "$var" filename # Will extract lines from filename
The following code,... (3 Replies)
I have a variable $exe in a shell script file a.sh which I need to access in another shell script file b.sh. How can I do that? :rolleyes:
Thanks!! (2 Replies)
Hello All,
I was just wondering if there is any direct way to access PL/SQL OUT variables from Korn Shell Script.
I could already figure out how to return a single value back from PL/SQL to Shell Script (using bind variable).
But, what if we want to return multiple values?
One option I... (4 Replies)
Hi All,
I have a shell script called sample1.sh where I have 2 variables. Now I have another shell script called sample2.sh. I want the variables in sample1.sh to be available to sample2.sh.
For example. In sample1.sh I am finding the sum of 2 numbers namely a and b. Now I want to access... (2 Replies)
I have the below code to find yesterdays date, In this I want to make MONTH, DAY and YEAR as global variableand use it outside the {}, but I am unable to do so , please assist:
#!/usr/bin/ksh
date '+%m %d %Y' |
{
read MONTH DAY YEAR
DAY=`expr "$DAY" - $1`
case "$DAY" in
0) ... (1 Reply)
Hi,
Can anyone explain this please..... This is on AIX with GDB (tried a few versions). It only happens when program compiled in 64 bit and only with static variables....
A simple test program...
### snip
#include <stdio.h>
main() {
static int n;
n = 6;
printf("hello %d\n", n);... (0 Replies)