08-22-2008
Quote:
Originally Posted by
Danny.Chouinard
VARIABLE="`grep MOLECULE < FILE | sed 's/^MOLECULE //'`"
should do it.
Yes, that work fine!
I have a lot of variables to read from files, all of them will be defined in the same way :
VARIABLE [ white space ] [ value to be assign ]
Is your little script the best way to do it efficiently?
Thanks a lot for you answer,
Tipi
10 More Discussions You Might Find Interesting
1. Solaris
Hi how do i grep only a part of the line from a file from all the lines.
file:
asdfgh 543212376 nag
lkjh abhilash 543757858
How do i grep and print only 543212376 and 543757858
Can i grep something like 543* and print only that. (3 Replies)
Discussion started by: 123nagendrabhi
3 Replies
2. Shell Programming and Scripting
How do I print only the values of the variables from set or env.
For example I have the lines
USER=USER
XYZ='text'
SHELL=/bin/bash
How do I print only the part after or starting from =
Let's say I have those lines in a list X
If I run
Y = echo $X | grep -o "=*$"
Y won't contain... (3 Replies)
Discussion started by: Transsive
3 Replies
3. UNIX for Dummies Questions & Answers
Hello All. I have an output file which contains the phrase "Total DFT Energy =" and then a number. This occurs many times in the output file, and what I want is to pipe the numbers (which are all different) to a file so I can plot them. How do I grep "Total DFT Energy =" and then get the numbers... (3 Replies)
Discussion started by: EinsteinMcfly
3 Replies
4. Shell Programming and Scripting
Hi,
Suppose,
DBconnection=jdbc: oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=x.x.x.x)(PORT=YYYY))(LOAD_BALANCE=yes)(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=project_db1)))
This is a part of a file <filename> . I Need to get the value of SERVICE_NAME from this line…
The... (4 Replies)
Discussion started by: Dpu
4 Replies
5. Shell Programming and Scripting
Hi I just started on GNU Grep with regex and am finding it very challenging and need to ask for help already...
here is the problem, I have a page (MYFILE) which consists of the following....
<div>
<input type="hidden" name="__EVENTTARGET" id="__EVENTTARGET" value="" />
<input type="hidden"... (2 Replies)
Discussion started by: noobie74645
2 Replies
6. UNIX for Dummies Questions & Answers
<exp code="12556a" message="ok, fine4" displayMessage="jksdfj ksd" \>
<exp code="123456a" message="ok, 2fine" displayMessage="jksdfj ksd" \>
<exp code="12dfgda" message="1ok, fine" displayMessage="jksdfj ksd" \>
now I want to cut code attribute and message attribute, such as ... (2 Replies)
Discussion started by: vincent_W
2 Replies
7. Shell Programming and Scripting
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)
Discussion started by: wenclu
6 Replies
8. Shell Programming and Scripting
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
9. UNIX for Dummies Questions & Answers
Hi,
I have a file with thousands of lines as below
INSERT INTO T_DIM_CLNT(CLNT_KY,CLNT_OBJ_ID,ISI_CLNT_ID,OPERN_ID,CLNT_NM,PRMRY_SIC_CD,PRMRY_SIC_DSC,RET_AGE_NBR,REC_CRT_TS,REC_DATA_EXTRC_TS,ETL_LOG_KY)
VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)... (5 Replies)
Discussion started by: sudhakar T
5 Replies
10. Shell Programming and Scripting
Hello,
I am java command from a shell script which will generate the below output on the command prompt
signature Base64 :... (10 Replies)
Discussion started by: chetanojha
10 Replies
CTL(5) CTL file format of ASIM/LIP6/CAO-VLSI lab. CTL(5)
NAME
ctl - Control Temporal Logic file format.
ORIGIN
This software belongs to the ALLIANCE CAD SYSTEM developed by the ASIM team at LIP6 laboratory of Universite Pierre et Marie CURIE, in
Paris, France.
Web : http://asim.lip6.fr/recherche/alliance/
E-mail : alliance-users@asim.lip6.fr
DESCRIPTION
This document describes the CTL file format used by moka(1) for model checking of finite states machine description.
This CTL file format subset is defined to enable classical CTL formulae description.
A CTL file is made of two parts: a declaration part and a formulae statement part.
The declaration part described types, constants, macros and all variables used in CTL formulae. It also describes assumption conditions
and initial conditions that have to be applied by moka(1) during the model checking.
The formulae statement part described all the CTL formulae that have to be verified.
All boolean and relational VHDL operators are supported (see vbe(5)) and also the 8 CTL operators AF, AG, AX, AU, EF, EG, EX and EU. The
CTL file format support also the imply boolean operator '->' and the equivalence operator '<=>'.
EXAMPLE
-- user type definition
TYPE A_ETAT_TYPE IS (A_E0, A_E1);
TYPE B_ETAT_TYPE IS (B_E0, B_E1);
-- variables definition
VARIABLE A_NS, A_CS : A_ETAT_TYPE;
VARIABLE B_NS, B_CS : B_ETAT_TYPE;
VARIABLE ck : BIT;
VARIABLE data_in : BIT;
VARIABLE data_out : BIT;
VARIABLE reset : BIT;
VARIABLE ack : BIT;
VARIABLE req : BIT;
-- example of a macros definition
DEFINE def1 : BOOLEAN := ack='1';
-- the assigned value can be a constant
DEFINE c1 : BIT := '1';
-- the assumption condition
ASSUME ass1 := (reset='0');
-- the initial reset condition
-- be careful, the assumption condition is not applied
-- to the initial conditions.
RESET_COND init1 := (reset='1');
-- It is also possible to describe the first state
-- with the INITIAL keywork, as follows:
--
-- INITIAL init1 := ((A_CS=A_E0) AND (B_CS=B_E0));
--
-- formulae description statement part
begin
prop1 : EX( ack='1' );
prop2 : AG( req -> AF( ack ) );
prop4 : AU( req='1', ack='1');
end;
SEE ALSO
moka(1)
BUG REPORT
This tool is under development at the ASIM department of the LIP6 laboratory.
We need your feedback to improve documentation and tools.
ASIM
/LIP6 August 5, 2002 CTL(5)