07-10-2013
Nope, that's not correct.
NR>=1 means equal or greater than 1. Since a file you want to parse usually has a 1st line, this makes no sense. You could leave it away if you want to count the header in.
If you want to skip the header line, you have to use
NR>1 to just skip it.
So if the 2nd example is just a new or altered request, you should be able to alter the code given, to achieve the same. If you do not understand the code, that is no problem, but you have to let us know.
This is no script drive-in
Last edited by zaxxon; 07-10-2013 at 08:02 AM..
Reason: spelling
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi to all,
I have a file where the subject could contain "Summarized Availability Report" or only "Summarized Report"
If the subject is "Summarized Availability Report" I want to apply it Scrip1 and if the subject is "Summarized Report"
I want to apply it Scrip2.
1-) I would like you... (5 Replies)
Discussion started by: cgkmal
5 Replies
2. Shell Programming and Scripting
I need to get the output in row wise for the repeated column data
Ex:
Input:
que = five
ans = 5
que = six
ans = 6
Required output:
que = five six
ans = 5 6
Any body can guide me?"""""" (2 Replies)
Discussion started by: vasanth_vadalur
2 Replies
3. UNIX for Dummies Questions & Answers
Hi
I am new to the forum and would like to ask:
i have a file in form with thousands of column
id.1 A01 A01 A68 A68
id.2 A5 A5 A3 A3
1001 0 0 0.136 0.136
1002 0 0 0.262 0.183
1003 0 0 0.662 0.662
1004 0 0 ... (9 Replies)
Discussion started by: newbeeuk
9 Replies
4. UNIX for Dummies Questions & Answers
I have a file that looks like this
452 025_E3
8 025_E3
82 025_F5
135 025_F5
5 025_F5
23 025_G2
38 025_G2
71 025_G2
9 026_A12
81 026_A12
10 026_A12
some of the elements in column2 are repeated.
I want an output file that will extract the... (1 Reply)
Discussion started by: FelipeAd
1 Replies
5. Emergency UNIX and Linux Support
Hi guys,
I need help in making a command to find some data.
I have multiple files in which multiple records are present.. Each record is separated with a carriage return and in each record there are multiple fields with each field separated by "|"
what i want is that I want to extract... (1 Reply)
Discussion started by: m_usmanayub
1 Replies
6. Shell Programming and Scripting
Please can you help in providing the most repeated entry in the 2nd column and give its count
Here is an input file
1, This , is a forum
2, This , is a forum
1, There , is a forum
2, This , is not right
Here the most repeated entry is "This" and count is 3
So output... (4 Replies)
Discussion started by: necro98
4 Replies
7. Shell Programming and Scripting
Hi below is the input file, i need to find repeated words and sum up the values of it which is second field from the repeated work.Im trying but getting no where close to it.Kindly give me a hint on how to go about it
Input
fruits,apple,20,fruits,mango,20,veg,carrot,12,veg,raddish,30... (11 Replies)
Discussion started by: 100bees
11 Replies
8. Shell Programming and Scripting
Hello, I have an input file:
LOC_Os04g01890\LOC_Os05g17604 0.051307
LOC_Os04g01890\LOC_Os05g17604 0.150977
LOC_Os04g01890\LOC_Os05g17604 0.306231
LOC_Os04g01890\LOC_Os06g33100 0.168037
LOC_Os04g01890\LOC_Os06g33100 0.236293 ... (3 Replies)
Discussion started by: Sanchari
3 Replies
9. Shell Programming and Scripting
Hello, I was looking for a way to select between the repeated entries (column1) based on the values of absolute values of column 3 (larger value). For example if the same gene id has FC value -2 and 1, I should get the output as -2. Kindly help.
GeneID Description FC ... (2 Replies)
Discussion started by: Sanchari
2 Replies
10. UNIX for Dummies Questions & Answers
Hi folks,
Iam working on a bash script, i need to print how many times column 2 repeated at the end of each line.
Input.txt
COL1 COL2 COL3 COL4
1 XX 45 N
2 YY 34 y
3 ZZ 44 N
4 XX 89 Y
5 XX 45 N
6 YY 84 D
7 ZZ 22 S
Output.txt
COL1 COL2 COL3 COL4 COL5
1 XX 45 N 3
2 YY 34... (6 Replies)
Discussion started by: tech_frk
6 Replies
LEARN ABOUT DEBIAN
ngraph
NGRAPH(1) General Commands Manual NGRAPH(1)
NAME
Ngraph - creating scientific 2-dimensional graphs
SYNOPSIS
ngraph [options] [data file(s) or ngp file]
DESCRIPTION
Ngraph is the program to create scientific 2-dimensional graphs for researchers and engineers. Graphs can be exported to PostScript, SVG,
PNG or PDF format.
OPTIONS
Command line options are:
-L file
load ngp file
-x column
data column for the x axis
-y column
data column for the y axis
-X use X axis as the x axis
-Y use Y axis as the y axis
-U use U axis as the x axis
-R use R axis as the y axis
-d {mark | line | polygon | curve | diagonal | arrow | rectangle | rectangle_fill | rectangle_solid_fill | errorbar_x | errorbar_y | stair-
case_x | staircase_y | bar_x | bar_y | bar_fill_x | bar_fill_y | bar_solid_fill_x | bar_solid_fill_y | fit}
specify plot type
-m type
specify mark type (0-89)
-o size
specify mark size
-l style
specify line style
-w width
specify line width
-CR n specify red component of the 1st plot color (0-255)
-CG n specify green component of the 1st plot color (0-255)
-CB n specify blue component of the 1st plot color (0-255)
-cr n specify red component of the 2nd plot color (0-255)
-cg n specify green component of the 2nd plot color (0-255)
-cb n specify blue component of the 2nd plot color (0-255)
-s line
specify number of the head skip
-r step
specify number of the read step
-f line
specify number of the final line
-vx n neighbor average of the x data
-vy n neighbor average of the y data
-mx formula
specify math transformation for the x data
-my formula
specify math transformation for the y data
-ex {linear | log | inverse | MJD}
specify scale type of the x axis
-ey {linear | log | inverse | MJD}
specify scale type of the y axis
-minx value
specify minimum value of x axis
-maxx value
specify maximum value of x axis
-incx value
specify increment value of x axis
-miny value
specify minimum value of y axis
-maxy value
specify maximum value of y axis
-incy value
specify increment value of y axis
-g load settings from data file
-png file
convert ngp file to PNG format
-pdf file
convert ngp file to PDF format
-ps file
convert ngp file to PostScript format
-eps file
convert ngp file to Encapsulated PostScript format
-svg file
convert ngp file to SVG format
-gra file
convert ngp file to GRA format
-dialog
show print dialog (with -p option)
-p file
print ngp file
-n output ngp-file to stdout
-h, --help
show help message
-v, --version
show version of Ngraph
-V, --VERSION
show detail information about Ngraph
FILES
${HOME}/.Ngraph/Ngraph.nsc
start up script
${HOME}/.Ngraph/Ngraph.ini
configuration file
${HOME}/.Ngraph/Ngraph.ngp
default graph
AUTHORS
Satoshi ISHIZAKA
Hiroyuki Ito <ZXB01226@nifty.com>
SEE ALSO
ngp2(1)
COPYRIGHT
Copyright (C) 2003 Satoshi ISHIZAKA
Copyright (C) 2008-2011 Hiroyuki Ito
4th Berkeley Distribution Local NGRAPH(1)