10-29-2012
Compare to values in a file in unix
Here is sample file
===============Index 0===================
isActive=0, Input=1, Output=1,
Status=1
State = Future , PRIMARY
UnderCount=2
inCount=2
outCount=0
SCount=673
--
===============Index 1===================
isActive=0, Input=1, Output=1,
Status=1
State = Future , PRIMARY
UnderCount=2
inCount=2
outCount=0
SCount=2
--
===============Index 2===================
isActive=0, Input=1, Output=1,
Status=1
State = Future , PRIMARY
UnderCount=2
inCount=2
outCount=0
SCount=2
--
i need to check the (incount=scount) if not print them
8 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I am new to unix and I need help in solving below mentioned issue, really appreciate ur help.
I have a file
sam, john, 2324, 07142007
tom, thomson, 2343, 07142007
john, scott, 2478, 07142007
its a comma delimited file, I need to extract the last column from each line and this... (4 Replies)
Discussion started by: vukkusila
4 Replies
2. UNIX for Dummies Questions & Answers
Hi,
I have a file containing the following data:
junk123junk723itemcode001qty01price10total10junkjunk
junk123junk723itemcode002qty02price10total20junkjunk
..
..
..
could be 5000+ lines
I have an algo and need a code to implement this:
1. Linecount = wc -l (should give 5000)
2. For i... (1 Reply)
Discussion started by: shiroh_1982
1 Replies
3. Shell Programming and Scripting
Hi everybody,
I have a file that looks like:
A B C D -1 0
E F G H -2 0
I J K L +1
M N O P -6
I would like to compare $5 of every line. If both values are negative, I calculate a mean value and write the first line and delete the second one. If the two $5 values are different only... (6 Replies)
Discussion started by: s-layer
6 Replies
4. Shell Programming and Scripting
- I have two files (File 1 and File 2) and the contents of the files are mentioned below.
- I am trying to compare the values of Column1 of File1 with Column1 of File2. If a match is found, print the corresponding value from Column2 of File1 in Column5 of File2.
- I tried to modify and use... (10 Replies)
Discussion started by: Santoshbn
10 Replies
5. Shell Programming and Scripting
Dear Unix experts,
I have got a file where I would like to compare the values of second column if first column is same in such a way that the difference between the values is >50. If not, I would like to discard both values.
For example, my input file looks like -
comp275_c0_seq2 73... (7 Replies)
Discussion started by: utritala
7 Replies
6. UNIX for Beginners Questions & Answers
Input File:-
COLUMN1 COLUMN2 COLUMN3 COLUMN4 COLUMN5 COLUMN6 SMS Email AO Mail Post N Cell
VEGE Potato E W 396 12 0 384 0 0 0 0 0
VEGE Onion S W 17 0 17 0 0 0 0 0 0
FRUIT APPLE N W 549 61 0 0 0 0 0 488 0
FRUIT APPLE SE W 291 14 239 38 0 10 0 0 0
FRUIT APPLE EAMS W 397 32 309 56 309 309 0... (27 Replies)
Discussion started by: Nina2910
27 Replies
7. Shell Programming and Scripting
Hi,
How do I compare two columns within a text file
If 2nd column values are same then I want to know 3rd column number matches or not
Example:
Prod Stag1 1234.79
Prod Stag2 1234.79 20
Prod Stag3 1234.79 30
Prod Stag4 1234.79
UAT Stag1 1243.56
UAT Stag2 1243.56 20
UAT ... (3 Replies)
Discussion started by: krux_rap
3 Replies
8. UNIX for Beginners Questions & Answers
I'm trying to learn awk, but I've hit a roadblock with this problem. I have a hierarchy stored in a file with 3 columns:
id name parentID
4 D 2
2 B 1
3 C 1
1 A 5
I need to check if there are any values in column 3 that are not represented anywhere in column 1. I've tried this:
awk '{arr;}... (7 Replies)
Discussion started by: kaktus
7 Replies
LEARN ABOUT DEBIAN
vhdlablvector
VHDLABLVECTOR(3) ABL FUNCTIONS VHDLABLVECTOR(3)
NAME
vhdlablvector - gives the index and the name of a vectorized name.
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
SYNOPSYS
#include "abl101.h"
char *vhdlablvector( Name, Index )
char *Name;
long *Index;
PARAMETERS
Name A vectorized name.
Index A pointer to long.
DESCRIPTION
vhdlablvector searches the index of a vectorized name, and the vector's name.
RETURN VALUE
If Name is a vectorized name, vhdlablvector returns the vector's name using namealloc, and its index throw Index. Otherwise, it returns a
null pointer.
EXAMPLE
#include "abl101.h"
long Index;
char *Name;
Name = vhdlablvector( "vec 2", &Index );
/* displays Name:vec, Index:2 */
printf( "Name:%s, Index:%d0, Name, Index );
SEE ALSO
abl(1), ablvhdlname(3).
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 October 1, 1997 VHDLABLVECTOR(3)