07-18-2008
Problem in accessing variables outside shell
Hi,
I have a shell script wherein i am doing some file operations and storing the data in some variables. I am exporting these variables as i need to use them outside shell. Then within the shell i am launching GDB session hoping that i will be able to access the exported variables in the GDB session.
I could launch the GDB session after doing the file operation but i am unable to access the exported variables. Is there any way to access the variables outside the shell?
Thanks in advance
Santosh
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
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)
Discussion started by: trupti wagh
1 Replies
2. Shell Programming and Scripting
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)
Discussion started by: wayne1411
7 Replies
3. Programming
Hi,
consider the following script.
ip='***.***.**.**'
user='****'
pw='******'
ftpresults=`ftp -nv $ip<<EOF
user $user $pw
cd /home/oracle/practice
size $1
bye
EOF`
fname=$1
echo $ftpresults
sqlplus -s tms/tms@dev45 <<"EOF"
insert into remote_file_sizes (file_name,file_size)... (1 Reply)
Discussion started by: ravi raj kumar
1 Replies
4. Shell Programming and Scripting
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)
Discussion started by: nasersh
3 Replies
5. Shell Programming and Scripting
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)
Discussion started by: looza
2 Replies
6. Shell Programming and Scripting
program name--test
#!/bin/bash
output1=`/home/user/a.c`
output2=`/home/user/a.c`
k=`$output1 + 1`
m=`$output2 + 1`
echo $k
echo $m
---------------------------------------------------------------------------
prgram name--a.c
#include<stdio.h>
int main() (1 Reply)
Discussion started by: sameworld1980
1 Replies
7. UNIX for Advanced & Expert Users
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)
Discussion started by: bright_future
4 Replies
8. Shell Programming and Scripting
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)
Discussion started by: rsendhilmani
2 Replies
9. Shell Programming and Scripting
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)
Discussion started by: mohsin.quazi
1 Replies
10. Programming
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)
Discussion started by: bagpussnz
0 Replies