Sponsored Content
Operating Systems AIX Best way to setup my own environmental variables ? Post 302402288 by leebix on Tuesday 9th of March 2010 10:34:00 AM
Old 03-09-2010
One method would be to define common variables in a library file and source it in at the start of the script.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

environmental varibles

flavor -- AIX 4.2.1 I am putting together some HTML pages, some of which contain forms. The problem pops up when I attempt to pass variables (from the forms) from one HTML page to a cgi-like page created using ksh. I have used the $1 - $9 vars, but they do not work with the passing. With... (1 Reply)
Discussion started by: Xiix
1 Replies

2. UNIX for Advanced & Expert Users

Environmental Variables - where stored ?

Hi all ! Yesterday I defined an environmental variable PATH, but today when I restarted machine, I could not see that it was stored any place. Is there any file where I could save the settings ? I have quite a few env.variables defined, so I need a smarter way to define. regards D (5 Replies)
Discussion started by: DGoubine
5 Replies

3. Shell Programming and Scripting

Environmental Variable

Hi, I'm exporting an environmental variable from a C program using putenv function. I'm calling the exe of the C program from shell script. But when I display the environmental variables from the Shell script, My varaible is not getting displayed. Can anyone please tell me how to get it in... (2 Replies)
Discussion started by: janemary.a
2 Replies

4. AIX

NIM server setup on etherchannel setup environment

I know that IBM's official stance is that NIM does not work on etherchannel environment, but has anyone able to get around it? I'm working on a p5-590 LPAR system, and the NIM master and clients are all on the same frame. Any help is appreciated. (1 Reply)
Discussion started by: pdtak
1 Replies

5. UNIX for Dummies Questions & Answers

Unix passing environmental Variables

In my script when I change an env variable in the parent shell it is only changed for that session - it there away to change it permanently using a script so that when I use rlogin (create a child session) that the env variable is set correctly? Basically what I am trying to do is to pass a... (7 Replies)
Discussion started by: belfastbelle
7 Replies

6. Shell Programming and Scripting

[bash] command line substitution with environmental variables

Hi, I'm using an array that contains compiler FLAGS that need to be executed either before ./configure or after the main 'make' command. example of array containing compiler flags. ------------------------------------------------- FLAGS="CFLAGS=\"-arch x86_64 -g -Os -pipe... (7 Replies)
Discussion started by: ASGR
7 Replies

7. Shell Programming and Scripting

Oracle environmental variables in shells script

Hi, Getting below error on executing the shell script which initiates sqlplus How to set oracle enviornment variables in the shell script ? With Regards (3 Replies)
Discussion started by: milink
3 Replies

8. Shell Programming and Scripting

Help with manipulating environmental variables in UNIX

I am wondering if there is away to increment a date in c shell. What I need to do is basic, but I lack the knowledge. I have they following environmental variable in my job scripts setenv YYYY `date '+%Y'` I then set YYYY to be part of my output dataset name: setenv dd_OUTPUTP... (1 Reply)
Discussion started by: jclanc8
1 Replies

9. OS X (Apple)

Don't understand the practical difference between command aliases and environmental variables

Hey, I'm recently learning Unix from the video course by Kevin Scoglund. I'm stuck at the moment where he goes into Environmenat variables. I have some issues with understanding what's the essential difference between EV and command aliases: for instance, by writing the command alias ll='ls... (3 Replies)
Discussion started by: scrutinizerix
3 Replies

10. Shell Programming and Scripting

<< Environmental Variables are not set when script completes >>

Hi Team, I have a wrapper script which i have pasted below, it internally calls one python script to generate Environmental in a file called /home/oracle/myenv.sh, when i execute this script via wrapper script, its not reflecting in my current session, still showing old env variables. any... (2 Replies)
Discussion started by: kamauv234
2 Replies
body(n) 							    [incr Tcl]								   body(n)

NAME
body - change the body for a class method/proc SYNOPSIS
body className::function args body DESCRIPTION
The body command is used outside of an [incr Tcl] class definition to define or redefine the body of a class method or proc. This facility allows a class definition to have separate "interface" and "implementation" parts. The "interface" part is a class command with declara- tions for methods, procs, instance variables and common variables. The "implementation" part is a series of body and configbody commands. If the "implementation" part is kept in a separate file, it can be sourced again and again as bugs are fixed, to support interactive devel- opment. When using the "tcl" mode in the emacs editor, the "interface" and "implementation" parts can be kept in the same file; as bugs are fixed, individual bodies can be highlighted and sent to the test application. The name "className::function" identifies the method/proc being changed. If an args list was specified when the function was defined in the class definition, the args list for the body command must match in mean- ing. Variable names can change, but the argument lists must have the same required arguments and the same default values for optional arguments. The special args argument acts as a wildcard when included in the args list in the class definition; it will match zero or more arguments of any type when the body is redefined. If the body string starts with "@", it is treated as the symbolic name for a C procedure. The args list has little meaning for the C pro- cedure, except to document the expected usage. (The C procedure is not guaranteed to use arguments in this manner.) If body does not start with "@", it is treated as a Tcl command script. When the function is invoked, command line arguments are matched against the args list, and local variables are created to represent each argument. This is the usual behavior for a Tcl-style proc. Symbolic names for C procedures are established by registering procedures via Itcl_RegisterC(). This is usually done in the Tcl_AppInit() procedure, which is automatically called when the interpreter starts up. In the following example, the procedure My_FooCmd() is registered with the symbolic name "foo". This procedure can be referenced in the body command as "@foo". int Tcl_AppInit(interp) Tcl_Interp *interp; /* Interpreter for application. */ { if (Itcl_Init(interp) == TCL_ERROR) { return TCL_ERROR; } if (Itcl_RegisterC(interp, "foo", My_FooCmd) != TCL_OK) { return TCL_ERROR; } } EXAMPLE
In the following example, a "File" class is defined to represent open files. The method bodies are included below the class definition via the body command. Note that the bodies of the constructor/destructor must be included in the class definition, but they can be redefined via the body command as well. class File { private variable fid "" constructor {name access} { set fid [open $name $access] } destructor { close $fid } method get {} method put {line} method eof {} } body File::get {} { return [gets $fid] } body File::put {line} { puts $fid $line } body File::eof {} { return [::eof $fid] } # # See the File class in action: # File x /etc/passwd "r" while {![x eof]} { puts "=> [x get]" } delete object x KEYWORDS
class, object, procedure itcl 3.0 body(n)
All times are GMT -4. The time now is 10:46 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy