11-12-2010
reading in properties file
Hi
Am new to this scripting stuff so bear with me.
I got a script made now that reads in a properties file. The properties file is in the following format:
256= Bos, Sea, FRa
128= HEL
I want to be able to read in each line of the file and split out the letter fields by the numbered field. This way I can compare the lettered field to another value I have thus I will know which corrisponding number to set. Basically have a script now which starts up a worker and I need to know which number to set for each individual branch. Hope this makes sense. thanks
10 More Discussions You Might Find Interesting
1. HP-UX
Hi
How can we identify the informations like Author, meta data, dependency and other information from a depot file? (1 Reply)
Discussion started by: sethumadhavan
1 Replies
2. UNIX for Dummies Questions & Answers
Hi ,
I do have a line in my code as follows:
if ] ; then
...
else
...
fi
What does the -z does ? Similarly there is -s in some other part of the code. I guess there are many options like this.. Can anybody please tell what all options are available and what do they mean ? (2 Replies)
Discussion started by: risshanth
2 Replies
3. Linux
# Timer for thread to sleep
thread.sleep =15000
# To run the thread as daemon process
thread.run = true
# Copy command
thread.cmd = C:\Program Files\Java\jdk1.5.0\bin\java CopyFile
This is .properties file. CopyFile is name of program.
is that ok. if i use cp command inplace of... (0 Replies)
Discussion started by: sari
0 Replies
4. Shell Programming and Scripting
Hi All,
I have a requirement to parse a file.
Let me clear you all on the req.
I have a job which contains multiple tasks and each task will have multiple attributes that will be in the below format. Each task will have some sequence number according to that sequence number tasks shld... (1 Reply)
Discussion started by: rajeshorpu
1 Replies
5. Shell Programming and Scripting
Hi,
i have a properties file a.prop where entry is like
PROCESS_IDX=0
Now in my shell schript i am doing like this.
#!/bin/sh
. a.prop
..............
-.......................
while read line
do
# tokenize the string by ",".
var=(`echo $line | tr ',' ' '`)
echo $PROCESS_IDX -->... (6 Replies)
Discussion started by: sailaja_80
6 Replies
6. Shell Programming and Scripting
Hi,
I am new to the shell script please I need help for following question.
I have properties file name called "com.test.properties" I have No of key values in this properties.
com.person.name = xyz
com.person.age = 55
com.person.address = hello
I want read this properties but i... (1 Reply)
Discussion started by: venukjs
1 Replies
7. Shell Programming and Scripting
Hi Friends,
I have a requirement to parse a properties file having a key=value pairs.
i need to count the number of key value pairs in the properties file and iterate through each key-value pair. I have written the script to read the number of lines from the property file, but cannot... (2 Replies)
Discussion started by: prashdeep
2 Replies
8. AIX
I have a FirstDoc application that integrates with SharePoint 2010.
As per the FirstDoc install guide, I need to generate the sharepoint_authentication properties file and place it on the server and the 2 Windows boxes that contain other components of the app.
The properties file I... (1 Reply)
Discussion started by: shoefiend
1 Replies
9. Shell Programming and Scripting
I need to install a bin file in UNIX which requires user interaction for giving some information like user id , path, sid etc. All these information is stored in a properties file in the same location.
So if i give ./file.bin -f propfile.properties will it install the file taking all the... (1 Reply)
Discussion started by: coolmohere
1 Replies
10. Shell Programming and Scripting
I want to read properties from a file and print evaluated values of each key.
I am using AIX6.1.
myfile.props
protocol=http
siteA.host=siteAhostname
pageA=pageNameA
siteAURL1=${protocol}:/${siteA.host}/pagea/blabla?v1=32
siteAURL2=${protocol}:/${siteA.host}/${pageA}/blabla?v1=32... (5 Replies)
Discussion started by: kchinnam
5 Replies
branch(1rheolef) rheolef-6.1 branch(1rheolef)
NAME
branch -- handle a family of fields
SYNOPSIS
branch [options] filename
EXAMPLE
Generates vtk file colection for visualization with paraview:
branch output.branch -paraview
DESCRIPTION
Read and output a branch of finite element fields from file, in field text file format.
INPUT FILE SPECIFICATION
-Idir add dir to the RHEOPATH search path. See also geo(2) for RHEOPATH mechanism.
filename
specifies the name of the file containing the input field.
- read field on standard input instead on a file.
-ndigit int
Number of digits used to print floating point values when using the `-geo' option. Default depends upon the machine precision asso-
ciated to the Float type.
OUTPUT AND RENDER SPECIFICATION
-extract int
Extract the i-th record in the file. The output is a field or multi-field file format.
-branch
Output on stdout in `.branch' format. This is the default.
-paraview
Generate a collection of vtk files for using paraview.
-vtk Generate a single vtk file with numbered fields.
-gnuplot
Run 1d animation using gnuplot.
-plotmtv
This driver is unsupported for animations.
OTHER OPTIONS
-umin float
-umax float
set the solution range for the gnuplot driver. By default this range is computed from the first field of the branch, and this could
be problematic when this field is initialy zero.
-topography filename[.field[.gz]]
performs a tridimensionnal elevation view based on the topographic data.
-proj performs a P1 projection on the fly. This option is useful when rendering P0 data while vtk render requieres P1 description.
-elevation
For two dimensional field, represent values as elevation in the third dimension. This is the default.
-noelevation
Prevent from the elevation representation.
-scale float
applies a multiplicative factor to the field. This is useful e.g. in conjonction with the elevation option. The default value is
1.
-verbose
print messages related to graphic files created and command system calls (this is the default).
-noverbose
does not print previous messages.
-clean clear temporary graphic files (this is the default).
-noclean
does not clear temporary graphic files.
-execute
execute graphic command (this is the default).
-noexecute
does not execute graphic command. Generates only graphic files. This is usefull in conjuction with the -noclean command.
BRANCH FILE FORMAT
The `.branch' file format bases on the `.field' one:
EXAMPLE GENERAL FORM
#!branch #!branch
branch branch
1 1 11 <version> <nfield=1> <nvalue=N>
time u <key> <field name>
#time 3.14 #<key> <key value 1>
#u #<field name>
field <field 1>
..... ....
..... ....
#time 6.28 #<key> <key value N>
#u #<field name>
field <field N>
..... ....
The key name is here time, but could be any string (without spaces). The previous example contains one field at each time step. Labels
appears all along the file to facilitate direct jumps and field and step skips.
The format supports several fields, such as (t,u(t),p(t)), where u could be a multi-component (e.g. a vector) field:
#!branch
branch
1 2 11
time u p
#time 3.14
#u
mfield
1 2
#u0
field
...
#u1
field
...
#p
#time 6.28
...
SEE ALSO
geo(2)
rheolef-6.1 rheolef-6.1 branch(1rheolef)