Sponsored Content
Top Forums Shell Programming and Scripting Accessing Variables from .conf file Post 302158852 by wayne1411 on Wednesday 16th of January 2008 12:05:17 PM
Old 01-16-2008
I need to define variables in a file called usermon.conf and then read in the variables from my main program to use there. I can do the rest of the program, by defining the variables in the program, but I can't figure out how to read in variables from another file.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

accessing variables declared in another perl script

Hi all, I have a perl script which declares two variables and calls another perl script which accesses those variables. But I am unable to access the variables in the called script. My script is as follows: my $ENV{a}="20"; system("perl called.pl"); and my called.pl contains: print... (3 Replies)
Discussion started by: gurukottur
3 Replies

2. Shell Programming and Scripting

accessing ksh variables from awk

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

3. Programming

accessing unix variables in oracle

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

Accessing Shell Variables in awk or sed

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

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... (2 Replies)
Discussion started by: jsantosh
2 Replies

6. UNIX for Advanced & Expert Users

Accessing PL/SQL OUT variables in Korn Shell Script

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

7. Solaris

basic question on sd.conf and lpc.conf file

Hello Guys, Do we need to configure this file only if we add SAN disk or even if we add local disk, do we need to modify? (4 Replies)
Discussion started by: mokkan
4 Replies

8. Shell Programming and Scripting

Accessing variables outside the function

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

9. Shell Programming and Scripting

PERL on windows accessing variables from a config file

Folks, I'm a perl moron, so please speak very slowly. : ) I'm modifying a build script that starts up an apache server. Now there is a .config file that hardcodes an old webserver path like this c:\oldWebserver. Now I don't want that hardcoded value, rather wish to use an... (3 Replies)
Discussion started by: MarkoRocko
3 Replies

10. Programming

GDB problem accessing static variables in C

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
SHOEWALL6-NETMAP(5)(5)						  [FIXME: manual]					    SHOEWALL6-NETMAP(5)(5)

NAME
params - Shorewall6 parameters file SYNOPSIS
/etc/shorewall6/params DESCRIPTION
Assign any shell variables that you need in this file. The file is always processed by /bin/sh or by the shell specified through SHOREWALL_SHELL in shorewall6.conf[1] (5) so the full range of shell capabilities may be used. It is suggested that variable names begin with an upper case letter to distinguish them from variables used internally within the Shorewall programs The following variable names must be avoided. Those in bold font must be avoided in all Shorewall versions; those in regular font must be avoided in versions prior to 4.4.8. Any option from shorewall6.conf[1] (5) COMMAND CONFDIR DEBUG ECHO_E ECHO_N EXPORT FAST FILEMODE HOSTNAME IPT_OPTIONS NOROUTES PREVIEW PRODUCT PROFILE PURGE RECOVERING RESTOREPATH RING_BELL SHAREDIR Any name beginning with SHOREWALL_ or SW_ STOPPING TEST TIMESTAMP USE_VERBOSITY VARDIR VERBOSE VERBOSE_OFFSET VERSION Example params file: NET_IF=eth0 NET_OPTIONS=dhcp,nosmurfs Example shorewall6-interfaces[2](5) file. ZONE INTERFACE BROADCAST OPTIONS net $NET_IF - $NET_OPTIONS This is the same as if the interfaces file had contained: ZONE INTERFACE BROADCAST OPTIONS net eth0 - dhcp,nosmurfs FILES
/etc/shorewall6/params SEE ALSO
http://www.shorewall.net/configuration_file_basics.htm#Variables[3] shorewall6(8), shorewall6-accounting(5), shorewall6-actions(5), shorewall6-blacklist(5), shorewall6-hosts(5), shorewall6-interfaces(5), shorewall6-maclist(5), shorewall6-policy(5), shorewall6-providers(5), shorewall6-rtrules(5), shorewall6-routestopped(5), shorewall6-rules(5), shorewall6.conf(5), shorewall6-secmarks(5), shorewall6-tcclasses(5), shorewall6-tcdevices(5), shorewall6-tcrules(5), shorewall6-tos(5), shorewall6-tunnels(5), shorewall6-zones(5) NOTES
1. shorewall6.conf http://www.shorewall.net/manpages6/shorewall6.conf.html 2. shorewall6-interfaces http://www.shorewall.net/manpages6/shorewall6-interfaces.html 3. http://www.shorewall.net/configuration_file_basics.htm#Variables http://www.shorewall.net/configuration_file_basics.htm#Variables? [FIXME: source] 06/28/2012 SHOEWALL6-NETMAP(5)(5)
All times are GMT -4. The time now is 12:35 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy