10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
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
2. Shell Programming and Scripting
OK, I'm striving to abide by all the rules this time.
Here is a fragment of my windows10/cygwin64/bash script:
export BUPLOG=$(BackupRecords --log "$src")
robocopy $(BackupRecords -mrbd "$src" --path "$src") $(BackupRecords --appSwitches "$src") "$src" "$dst" $(BackupRecords --fileSwitches... (15 Replies)
Discussion started by: siegfried
15 Replies
3. Shell Programming and Scripting
OK, I'm striving to abide by all the rules this time.
Here is a fragment of my windows10/cygwin64/bash script:
export BUPLOG=$(BackupRecords --log "$src")
robocopy $(BackupRecords -mrbd "$src" --path "$src") $(BackupRecords --appSwitches "$src") "$src" "$dst" $(BackupRecords --fileSwitches... (0 Replies)
Discussion started by: siegfried
0 Replies
4. OS X (Apple)
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
5. Shell Programming and Scripting
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
6. Shell Programming and Scripting
I have one script calling another with a set of strings that includes white space. Script A calls Script B with these input strings: one two "th ree"
Script B pulls apart the arguments correctly:
arg0 = one, arg1 = two, arg2 = "th ree"
if I call it from within Script A like so:... (10 Replies)
Discussion started by: skippyV
10 Replies
7. Shell Programming and Scripting
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. AIX
I am writing a few korn scripts to be used by all our operators on several 4.1/4.2 AIX servers.
I want to create environmental variables that once set, can be read/modified by my scripts (ex: specific folders, file names, conventions, general values, ...). I thought this would be better then... (4 Replies)
Discussion started by: Browser_ice
4 Replies
9. UNIX for Dummies Questions & Answers
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
10. UNIX for Advanced & Expert Users
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
variable(n) Tcl Built-In Commands variable(n)
__________________________________________________________________________________________________________________________________________________
NAME
variable - create and initialize a namespace variable
SYNOPSIS
variable ?name value...? name ?value?
_________________________________________________________________
DESCRIPTION
This command is normally used within a namespace eval command to create one or more variables within a namespace. Each variable name is
initialized with value. The value for the last variable is optional.
If a variable name does not exist, it is created. In this case, if value is specified, it is assigned to the newly created variable. If
no value is specified, the new variable is left undefined. If the variable already exists, it is set to value if value is specified or
left unchanged if no value is given. Normally, name is unqualified (does not include the names of any containing namespaces), and the
variable is created in the current namespace. If name includes any namespace qualifiers, the variable is created in the specified names-
pace. If the variable is not defined, it will be visible to the namespace which command, but not to the info exists command.
If the variable command is executed inside a Tcl procedure, it creates local variables linked to the corresponding namespace variables (and
therefore these variables are listed by info vars.) In this way the variable command resembles the global command, although the global
command only links to variables in the global namespace. If any values are given, they are used to modify the values of the associated
namespace variables. If a namespace variable does not exist, it is created and optionally initialized.
A name argument cannot reference an element within an array. Instead, name should reference the entire array, and the initialization value
should be left off. After the variable has been declared, elements within the array can be set using ordinary set or array commands.
EXAMPLES
Create a variable in a namespace:
namespace eval foo {
variable bar 12345
}
Create an array in a namespace:
namespace eval someNS {
variable someAry
array set someAry {
someName someValue
otherName otherValue
}
}
Access variables in namespaces from a procedure:
namespace eval foo {
proc spong {} {
# Variable in this namespace
variable bar
puts "bar is $bar"
# Variable in another namespace
variable ::someNS::someAry
parray someAry
}
}
SEE ALSO
global(n), namespace(n), upvar(n)
KEYWORDS
global, namespace, procedure, variable
Tcl 8.0 variable(n)