I may not being doing this description justice, but I'll give it a try.
I created a mailx script; there will be several messages using the same script where the only difference is the content. So I figured I'd make the content of the message a variable retrieved from a separate file. I have five... (5 Replies)
Hi,
I like to set a variable "name" automatically by reading an xml file. My code looks like this:
set name = `awk '/<generationTime>/,/<\/generationTime>/ p' $xml_name`
the "name" is thus set to
<generationTime>2004-12-01T08:23:50.000000</generationTime>
How can I separate this line,... (3 Replies)
Hi,
I like to set a variable "name" automatically by reading an xml file. The name should be set to the date, which is a part of the following line of the xml file:
<sceneID>C82_N32_A_SM_strip_008_R_2009-11-24T04:22:12.790028Z</sceneID>
How can I separate this line, that the name will... (6 Replies)
Hello,
I have following problem.
I have the result of a database request. I preparated the result via sed, etc. as a string in a file.
The string in the file is:
($3==1 || $3==2 || $3==3 || $3==4)
Now I want to use the String as a command in an if-statement.
So I assigned the string to a... (3 Replies)
Hi friends,
I want to select and use the certain part of a line. For example I have the following line
home/1245/hgdf/acsdf/myhome/afolder/H2O/endfile
how can I extract the part " /myhome/afolder/H2O/endfile "
thanks (6 Replies)
Hi,
I am working on one script..I am having files in the below format
file 1 (each line is separated with : delimeter)
SPLASH:SPLASH:SVN
CIB/MCH:MCH:SVN
Now I want from file 1 that most left part of the first line will store in... (6 Replies)
Hello Friends,
I need a command (or script line) that allows me to use of a part of line (given by me) as a variable. Let us assume the name of the command is MYCMD.
When I type
MYCMD fish://mfong@vhl.gov.nd/homefolder/hhk/ADS/
it must do the following job
cd /homefolder/hhk/ADS/
... (18 Replies)
Hi,
I have 80 large files, from which I want to get a specific value to run a Bash script. Firstly, I want to get the part of a file which contains this:
Name =A
xxxxxx
yyyyyy
zzzzzz
aaaaaa
bbbbbb
Value = 57
This is necessary because in a file there are written more lines which... (6 Replies)
All,
I have a log file containing lots of data now i want to extract all text between block below(names) without the title or end pattern but only names,
++++START++++
SCOTT TIGER
HENRY PAUL
JARED OTIENO
OMOLLO JA NIGERIA
++++END++++
the names i want to return and store in a variable in... (1 Reply)
I need some help. I would like to read in a text file.
Take a variable such as ROW-D-01, compare it to what's in one line in the text file such as PROD/VM/ROW-D-01 and only input PROD/VM into a variable without the /ROW-D-01.
Is this possible? any help is appreciated. (2 Replies)
Discussion started by: xChristopher
2 Replies
LEARN ABOUT OPENDARWIN
set
set(n) Tcl Built-In Commands set(n)
__________________________________________________________________________________________________________________________________________________NAME
set - Read and write variables
SYNOPSIS
set varName ?value?
_________________________________________________________________DESCRIPTION
Returns the value of variable varName. If value is specified, then set the value of varName to value, creating a new variable if one
doesn't already exist, and return its value. If varName contains an open parenthesis and ends with a close parenthesis, then it refers to
an array element: the characters before the first open parenthesis are the name of the array, and the characters between the parentheses
are the index within the array. Otherwise varName refers to a scalar variable. Normally, varName is unqualified (does not include the
names of any containing namespaces), and the variable of that name in the current namespace is read or written. If varName includes names-
pace qualifiers (in the array name if it refers to an array element), the variable in the specified namespace is read or written.
If no procedure is active, then varName refers to a namespace variable (global variable if the current namespace is the global namespace).
If a procedure is active, then varName refers to a parameter or local variable of the procedure unless the global command was invoked to
declare varName to be global, or unless a variable command was invoked to declare varName to be a namespace variable.
SEE ALSO
expr(n), proc(n), trace(n), unset(n)
KEYWORDS
read, write, variable
Tcl set(n)