Sponsored Content
Top Forums Shell Programming and Scripting Treat value of variable as env variable Post 302907877 by CarloM on Wednesday 2nd of July 2014 07:50:45 AM
Old 07-02-2014
Code:
echo ${!Dir}

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

bash env variable containing @

I want to set a bash env variable which has @ in its name, for example, @YOGESH@ may i know how do i do this? (4 Replies)
Discussion started by: Yogesh Sawant
4 Replies

2. UNIX for Dummies Questions & Answers

PWD env variable

Could you please tell me, which process / file is responsible for the setting of PWD env variable in Solaris Thanks (1 Reply)
Discussion started by: chaandana
1 Replies

3. UNIX for Dummies Questions & Answers

Env Variable

Hi, I have a doubt on Environment variable. I want to know where and when the envirnment variables are defined? Thanks & Regards, Siba (1 Reply)
Discussion started by: siba.s.nayak
1 Replies

4. Shell Programming and Scripting

Doubt on ENV variable

Question 1: If I set ENV=$HOME/myenvprofile.ksh, will my script get executed when ever I login to my with KSH. My doubt is we used to put this in .profile of our home directory. SO when ever I login will it executed? QUestion 2: If I set ENV=`echo "hi"` or 'echo "hi" ', what would be the output.... (0 Replies)
Discussion started by: ramkrix
0 Replies

5. Shell Programming and Scripting

get env variable from last script

I have 2 scripts t2.sh calls t1.sh. I need to get the vaule of a env variable from t1.sh /tmp/test$ cat t1.sh #!/bin/sh INSTANCE="font/fc-cache" export INSTANCE svcadm disable ${INSTANCE} /tmp/test$ cat t2.sh #!/bin/sh . /tmp/test/t1.sh echo ${INSTANCE} The above works... (9 Replies)
Discussion started by: honglus
9 Replies

6. UNIX for Dummies Questions & Answers

Accessing Global Env Variable

Greetings: I need to remove 'RUBYOPT' env variable to install MacRuby. I see it via $env (tchrc). I checked my (local) .tcshrc, .login, .profile files: not defined there. Apparently, it's not set locally. I know this RUBYOPT is global, since I can see it in another account on my... (4 Replies)
Discussion started by: UncleRic
4 Replies

7. Shell Programming and Scripting

Env variable

Hello, I want to cange env variable on SunOS. I tried: export GONGA=$GONGA:/users/BANK1/basic/queues/SARON_SPACE1 it changed it only localy for my session. when i opened a new session (telnet etc') the old value exist. How can I change it to effact all sessions. Thanks. (2 Replies)
Discussion started by: LiorAmitai
2 Replies

8. Shell Programming and Scripting

Add env variable in a file

Hi, I have a small requirement set -x `grep IMPACT_HOME=/opt/impact /opt/NETCOOLINST/r.txt | cut -d'=' -f2` if ; then sed 's#IMPACT_HOME=*#d' /opt/NETCOOLINST/r.txt echo "IMPACT_HOME=" >> /opt/NETCOOLINST/r.txt sed 's#IMPACT_HOME=*#IMPACT_HOME=/opt/impact#g' /opt/NETCOOLINST/r.txt... (2 Replies)
Discussion started by: dbashyam
2 Replies

9. Solaris

Env variable in solaris

Hi, Am installing SAP on Solaris 10. How to set env variables permanently? Reg (0 Replies)
Discussion started by: daggupati453
0 Replies

10. Web Development

Deny from env=env-variable Does not work

(Above from Apache docs). On my system, using: SetEnvIf User-Agent Mozilla IsBad=1 Order allow,deny Allow from all Deny from env=IsBad ...I see that environment variable is set (using phpinfo()) but the page is still served. No errors in the Apache logs. (1 Reply)
Discussion started by: gnurob
1 Replies
snmpm_conf(3erl)					     Erlang Module Definition						  snmpm_conf(3erl)

NAME
snmpm_conf - Utility functions for handling the manager config files. DESCRIPTION
The module snmpm_conf contains various utility functions to used for manipulating (write/append/read) the config files of the SNMP manager. EXPORTS
manager_entry(Tag, Val) -> manager_entry() Types Tag = address | port | engine_id | max_message_size Val = term() manager_entry() = term() Create an entry for the manager config file, manager.conf . The type of Val depends on the value of Tag , see Manager Information for more info. write_manager_config(Dir, Conf) -> ok write_manager_config(Dir, Hdr, Conf) -> ok Types Dir = string() Hdr = string() Conf = [manager_entry()] Write the manager config to the manager config file. Dir is the path to the directory where to store the config file. Hdr is an optional file header (note that this text is written to the file as is). See Manager Information for more info. append_manager_config(Dir, Conf) -> ok Types Dir = string() Conf = [manager_entry()] Append the config to the current manager config file. Dir is the path to the directory where to store the config file. See Manager Information for more info. read_manager_config(Dir) -> Conf Types Dir = string() Conf = [manager_entry()] Read the current manager config file. Dir is the path to the directory where to store the config file. See Manager Information for more info. users_entry(UserId) -> users_entry() users_entry(UserId, UserMod) -> users_entry() users_entry(UserId, UserMod, UserData) -> users_entry() Types UserId = term() UserMod = atom() UserData = term() standard_entry() = term() Create an entry for the manager users config file, users.conf . users_entry(UserId) translates to the following call: users_entry(UserId, snmpm_user_default) . users_entry(UserId, UserMod) translates to the following call: users_entry(UserId, UserMod, undefined) . See Users for more info. write_users_config(Dir, Conf) -> ok write_users_config(Dir, Hdr, Conf) -> ok Types Dir = string() Hdr = string() Conf = [users_entry()] Write the manager users config to the manager users config file. Dir is the path to the directory where to store the config file. Hdr is an optional file header (note that this text is written to the file as is). See Users for more info. append_users_config(Dir, Conf) -> ok Types Dir = string() Conf = [users_entry()] Append the users config to the current manager users config file. Dir is the path to the directory where to store the config file. See Users for more info. read_users_config(Dir) -> Conf Types Dir = string() Conf = [users_entry()] Read the current manager users config file. Dir is the path to the directory where to store the config file. See Users for more info. agents_entry(UserId, TargetName, Comm, Ip, Port, EngineID, Timeout, MaxMessageSize, Version, SecModel, SecName, SecLevel) -> agents_entry() Types UserId = term() TargetName = string() Comm = string() Ip = string() Port = integer() EngineID = string() Timeout = integer() MaxMessageSize = integer() Version = v1 | v2 | v3 SecModel = v1 | v2c | usm SecName = string() SecLevel = noAuthNoPriv | authNoPriv | authPriv agents_entry() = term() Create an entry for the manager agents config file, agents.conf . See Agents for more info. write_agents_config(Dir, Conf) -> ok write_agents_config(Dir, Hdr, Conf) -> ok Types Dir = string() Hdr = string() Conf = [_entry()] Write the manager agents config to the manager agents config file. Dir is the path to the directory where to store the config file. Hdr is an optional file header (note that this text is written to the file as is). See Agents for more info. append_agents_config(Dir, Conf) -> ok Types Dir = string() Conf = [agents_entry()] Append the agents config to the current manager agents config file. Dir is the path to the directory where to store the config file. See Agents for more info. read_agents_config(Dir) -> Conf Types Dir = string() Conf = [agents_entry()] Read the current manager agents config file. Dir is the path to the directory where to store the config file. See Agents for more info. usm_entry(EngineID, UserName, AuthP, AuthKey, PrivP, PrivKey) -> usm_entry() usm_entry(EngineID, UserName, SecName, AuthP, AuthKey, PrivP, PrivKey) -> usm_entry() Types EngineID = string() UserName = string() SecName = string() AuthP = usmNoAuthProtocol | usmHMACMD5AuthProtocol | usmHMACSHAAuthProtocol AuthKey = [integer()] PrivP = usmNoPrivProtocol | usmDESPrivProtocol | usmAesCfb128Protocol PrivKey = [integer()] usm_entry() = term() Create an entry for the agent community config file, community.conf . See Security data for USM for more info. write_usm_config(Dir, Conf) -> ok write_usm_config(Dir, Hdr, Conf) -> ok Types Dir = string() Hdr = string() Conf = [usm_entry()] Write the manager usm config to the manager usm config file. Dir is the path to the directory where to store the config file. Hdr is an optional file header (note that this text is written to the file as is). See Security data for USM for more info. append_usm_config(Dir, Conf) -> ok Types Dir = string() Conf = [usm_entry()] Append the usm config to the current manager usm config file. Dir is the path to the directory where to store the config file. See Security data for USM for more info. read_usm_config(Dir) -> Conf Types Dir = string() Conf = [usm_entry()] Read the current manager usm config file. Dir is the path to the directory where to store the config file. See Security data for USM for more info. Ericsson AB snmp 4.19 snmpm_conf(3erl)
All times are GMT -4. The time now is 09:58 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy