Sponsored Content
Top Forums Shell Programming and Scripting Print rows with value zero or less than zero using awk Post 302938034 by quincyjones on Wednesday 11th of March 2015 12:22:28 PM
Old 03-11-2015
Print rows with value zero or less than zero using awk

I tried this. It working fine for small tables. But it is giving values greater than zero in a big file with 8556 columns. Does any one know why ?

Code:
awk 'FNR == 1{print;next}{for(i=8556;i<=NF;i++) if($i <= 0){print;next}}' input

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

print selected rows with awk

Hi everybody: Could anybody tell me how I can print from a file a selected rows with awk. In my case I only want print in another file all the rows from NR=8 to NR=2459 and the increment each 8 times. I tried to this: awk '{for (i=8; i=2459; i+=8); NR==i}' file1 > file2 But doesn't... (6 Replies)
Discussion started by: tonet
6 Replies

2. Shell Programming and Scripting

want to print output if u have rows and columns

U have a file File 1 0.3 0.2 0.4 0.3 0.8 0.11 0.22 0.4 0.23 0.45 0.56 0.78 0.98 0.11 0.32 0.2 0.4 0.45 0.54 0.2 0.33 0.44 0.21 0.22 0.98 0.8 0.2 0.34 0.54 0.98 0.12 0.1 0.22 0.32 0.34 0.89 0.22 File 2 rows columns 3 1 2 3 4 2 5 ... (8 Replies)
Discussion started by: cdfd123
8 Replies

3. UNIX for Advanced & Expert Users

Print rows into columns

Hi, I required to print all rows into columns(some comma separated or else) till a pattern match found. Using Solaris UNIX scripting my input is like abc def ghi jkl mno END pqr stu vwx yz 123 END ... ... (7 Replies)
Discussion started by: vikash.rastogi
7 Replies

4. UNIX for Dummies Questions & Answers

search one row and print next 9 rows

Hi, I'd like your support on this, my file looks like this: 25 50 200 10 0 1 10 6 12 17 26 24 30 319 10 -0.83 3.31 270.646 12.48 -163.04 30.38 0 0 0 -2.88 0.64 16.06 34.4 33.08 34.4 33.08 34.06 20.48 6.22 -33.39 33.96 -33.5840381 -71.6177759 -163.26 25.59 34.1 -28.8 -5.6 -9.9 0 0 0 0... (3 Replies)
Discussion started by: Gery
3 Replies

5. UNIX for Dummies Questions & Answers

Print individual rows.

Hi all, I have a file im reading with a for loop using: for i in $(cat filename) do etc. done the original file is 3 columns, this method prints it out into 3 rows, and i would like to just assign the first to rows (originally first two columns) to separate variables. What would be... (3 Replies)
Discussion started by: jgrosecl
3 Replies

6. UNIX for Dummies Questions & Answers

Awk: Print out overlapping chunks of file - rows 0-20,10-30,20-40 etc.

First time poster, but the forum has saved my bacon more times than... Lots. Anyway, I have a text file, and wanted to use Awk (or any other sensible program) to print out overlapping sections, or arbitrary length. To describe by example, for file 1 2 3 4 5 etc... I want the out put... (3 Replies)
Discussion started by: matfald
3 Replies

7. Shell Programming and Scripting

awk command to print only selected rows in a particular column specified by column name

Dear All, I have a data file input.csv like below. (Only five column shown here for example.) Data1,StepNo,Data2,Data3,Data4 2,1,3,4,5 3,1,5,6,7 3,2,4,5,6 5,3,5,5,6 From this I want the below output Data1,StepNo,Data2,Data3,Data4 2,1,3,4,5 3,1,5,6,7 where the second column... (4 Replies)
Discussion started by: ks_reddy
4 Replies

8. Shell Programming and Scripting

Print various rows in one row

I have this in a file 11.22.33.44 yyyyyyuser With awk/sed, I need this to be output as follows alias server.domain.com='ssh yyyyyyuser@11.22.33.44' (4 Replies)
Discussion started by: anil510
4 Replies

9. Shell Programming and Scripting

Print rows based on separator

For below lines in a file. 68078971 dance routine (jess far back corner) 13902786 368079527 dance routine 13902786 368081191 dance routine (jess far back) 13902786 I am looking for output as below 68078971, "dance routine (jess far back corner)", 13902786... (4 Replies)
Discussion started by: Anjan1
4 Replies

10. Shell Programming and Scripting

Awk- Indexing a list of numbers in file2 to print certain rows in file1

Hi Does anyone know of an efficient way to index a column of data in file2 to print the coresponding row in file1 which corresponds to the data in file2 AND 30 rows preceding and after the row in file1. For example suppose you have a list of numbers in file2 (single column) as follows:... (6 Replies)
Discussion started by: Geneanalyst
6 Replies
NERO(1) 						   Alliance - nero User's Manual						   NERO(1)

NAME
nero - Negotiating Router SYNOPSIS
nero [ -h ] [ -v ] [ -V ] [ -c ] [ -2 ] [ -3 ] [ -4 ] [ -5 ] [ -6 ] [ -L ] [ -G ] [ --help ] [ --verbose ] [ --very-verbose ] [ --core-dump ] [ --local ] [ --global ] [ -p placement ] netlist layout DESCRIPTION
nero is a simple router suited for small academic designs. Currently it can process designs of size up to 4K gates. GLOBAL ROUTING A design is considered as big if it contains nets which half perimeter is greater than 800 lambdas. Global routing is used on big designs. In nero, "global routing" means that the longuests nets are completly routed in a first step with only routing layers numbers 3 & 4. Then the smaller nets are routed with all avalaibles layers. This implies that when global routing is used, the number of routing layers is forced to at least 4. In each step, the nets are routed from the shortest to the longuest with the same routing algorithm. INVOCATION
nero mandatory arguments : o netlist : the name of the design, whithout any extention. Please note that unless a -p placement option is given, the file holding the placement is expected to have the same name as the netlist file (short of the extention). o layout : the name of the resulting routed layout. Be careful of not giving the same name as the netlist, in this case the initial place- ment will be silently overwritten. nero optionnals arguments : o -h, --help : print help. o -v, --verbose : be verbose. o -V, --very-verbose : be unbearably verbose. o -c, --core-dump : do not prevent the generation of core dumps in case of a crash. Mostly used during the development stage. o -2, -3, -4, -5, -6 : set the numbers of layers used for routing. The default for small designs is 2 and 4 for big ones. When global rout- ing took place, the router will uses at least 4 routing layers. o -L, --local : turn off the global routing stage, whatever the size of the design. Be warned that this will enormously slow down the routing process. o -G, --global : turn on the global routing regardless of the size of the design. o -p placement, --place placement : specify a name for the placement file different from the netlist name. EXAMPLE
Route the netlist amd2901_core.vst, using the placement file amd2901_core_p.ap and store the result in amd2901_core_r. $ export MBK_IN_LO=vst $ export MBK_IN_PH=ap $ export MBK_OUT_PH=ap $ nero -V --place amd2901_core_p amd2901_core amd2901_core_r SEE ALSO
MBK_IN_LO(1), MBK_OUT_LO(1), MBK_IN_PH(1), MBK_OUT_PH(1), ocp(1), ocr(1), druc(1), cougar(1) ASIM
/LIP6 13 October 2002 NERO(1)
All times are GMT -4. The time now is 05:01 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy