Creating subset of compilation errors


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Creating subset of compilation errors
# 8  
Old 11-05-2012
Quote:
Originally Posted by kristinu
...
Code:
 awk -F: '/createmodl.f08/ {P= $2>=1000 && $2<=1100} P' file

How does this work exactly?
It checks for the existence of createmodl in a line, then, if $2 is greater than or equal 1000 AND less than or equal 1100, it sets the logical variable P to 1, to 0 in all other cases. While P = 1, i.e. $2 between 1000 and 1100, every line is printed.
To build your desired script, use as follows:
Code:
awk -v fn=createmodl.f08 -v ls=1000 -v le=1100 'match($0,fn) {P= $2>=ls && $2<=le} P' FS=":" cmplnk.smry

# 9  
Old 11-05-2012
Nothing wrong

Quote:
Originally Posted by pamu
So whats the problem....Smilie

Code:
$ cat file
createmodl.f08:800.36:
createmodl.f08:900.36:
createmodl.f08:1030.36:
createmodl.f08:1050.36:
Error
Error
ErrorError
Error
Error
Error
createmodl.f08:1090.36:
createmodl.f08:1132.36:
Errordfsdf

Code:
$ cat awk.awk
BEGIN {
  FS = ":"
}
$1 == fn && $2 >= ls { s = 1 }
$1 == fn && $2 >= le { s = "" }
{ if (s) { print } }

Code:
$ awk -v fn=createmodl.f08 -v ls=1000 -v le=1100 -f awk.awk file
createmodl.f08:1030.36:
createmodl.f08:1050.36:
Error
Error
ErrorError
Error
Error
Error
createmodl.f08:1090.36:

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Creating a tarball on Solaris issue with errors

Hi All, We are planning to migrate from Solaris to AIX, and we have a requirement to move all files modified in last 7 days to AIX. i found many helpful forums on this site but somehow the issue was still not solved: Used the following command from the directory which we want to scan ... (6 Replies)
Discussion started by: nikhil8
6 Replies

2. Shell Programming and Scripting

Creating subset of a file based on specific columns

Hello Unix experts, I need a help to create a subset file. I know with cut comand, its very easy to select many different columns, or threshold. But here I have a bit problem as in my data file is big. And I don't want to identify the column numbers or names manually. I am trying to find any... (7 Replies)
Discussion started by: smitra
7 Replies

3. UNIX for Dummies Questions & Answers

how to get a subset of such a file

Dear all, I have a file lik below: n of row=420, n of letters in each row=100000 like below: there is no space between the letters. what I want is: the 75000th letter to the 85000th letter in each row. how to do that? thanks a lot! ... (2 Replies)
Discussion started by: forevertl
2 Replies

4. UNIX for Dummies Questions & Answers

XEmacs compilation errors not understandable

Hi all! I am new to this forum. I have recently installed Cygwin and XEmacs on my laptop running Windows Vista. I am studing at the moment and the code I am creating is mainly for that purpose. I am trying to create the algorithm of Insertion sort. When I compile my code in XEmacs i get some... (1 Reply)
Discussion started by: BlueTower
1 Replies

5. UNIX for Dummies Questions & Answers

Help with subset and if-then statements

Hello everyone. I'm new to the boards, I hope I can get and possibly give some help through these forums. I need some help. I have two CSV files, let's call them File A and File B. This is the structure for File A: ID, VAR1, VAR2, VAR3 - VAR50 (where the VAR 1-VAR50 are either 0 or 1) ... (1 Reply)
Discussion started by: JWill
1 Replies

6. Shell Programming and Scripting

Compilation errors in running configure script

Hi all, I tried to cross compile Ghostscript-8.54 source. I am getting some errors during cross compilation. I have pasted the errors below. CC=arm-unknown-linux-gnu-gcc LD=arm-unknown-linux-gnu-ld ./configure --host=i686-pc-linux-gnu --target=arm-unknown-linux-gnu --without-x && make ... (2 Replies)
Discussion started by: siva4ever
2 Replies

7. Programming

xtrlock compilation errors

Hello, Trying to compile xtrlock from source on a RHEL system. It has an Imakefile but not being familiar enough with that system getting errors running imake: #! Imakefile for xtrlock - X Transparent Lock #! #! Copyright (C)1993,1994 Ian Jackson #! #! This is free software; you can... (1 Reply)
Discussion started by: mgb
1 Replies

8. Linux

c++ compilation errors

Hello every one, while compiling c++ modules. i am getting the following 2 errors. 1) /root/cc/unix-ce/root/subsys/cb/cdbh/include/cdbh_TransferFileHeader.h:111: error: âulong_tâ does not name a type /root/cc/unix-ce/root/subsys/cb/cdbh/include/cdbh_TransferFileHeader.h:118: error: âulong_tâ... (0 Replies)
Discussion started by: mannam srinivas
0 Replies

9. AIX

Compilation of gettext produces relink errors

Hi, I'm in the process of compiling gnu gettext on a rs/6000 43p-260 running AIX 5.1 in 64bit-mode. The compilation itself runs fine as I understand it, however the installation itself fails like so: I'm pretty much clueless about this relink stuff, so if anyone has suggestions, I'll try... (0 Replies)
Discussion started by: töfte
0 Replies

10. Shell Programming and Scripting

how to capture compilation errors with Makfile

Hello I have big compilation project when I run the top make file I have problem to find the errors that acres in the sub directories because the make file keeps Running the compilation. is there any way to perform summry of the errors when the Top makefile done running ? thanks (2 Replies)
Discussion started by: umen
2 Replies
Login or Register to Ask a Question