So, I have a massive file with thousands of columns
I want a list of the headers in one column in another file.
So I need to strip off the top line (can use head-1)
But how can I convert from this format:
A B C D E F G
to
A
B
C
D
E
F
G (6 Replies)
Hi, Please read the whole thread.
I have been working on this script below. It works fine, feel free to copy and test with the INPUT File below as well.
example:
PACKET DATA PROTOCOL CONTEXT DATA
APNID PDPADD EQOSID VPAA PDPCH PDPTY PDPID
10 ... (6 Replies)
Hi Friends,
I have a single column data like below.
1
2
3
4
5
I need the output like below.
0
1
2
3
4
where each row (including first row) subtracting from first row and the result should print below like the way shown in output file.
Thanks
Sid (11 Replies)
Hi,
I have an input like this
1 2 3 4
2 3 4 5
4 5 6 7
I would like to count the no. of columns and print a header with a prefix "Col".
I would also like to count the no. of rows and print as first column with each line number with a prefix "Row"
So, my output would be
... (2 Replies)
Greetings!
I have been trying to find out a way to take a CSV file with a large number of rows, and a very large number of columns (in the thousands) and convert the rows to a single column of data, where the first row is a header representing the attribute name and the subsequent series of... (3 Replies)
Please help me to get required output for both scenario 1 and scenario 2 and need separate code for both scenario 1 and scenario 2
Scenario 1
i need to do below changes only when column1 is CR and column3 has duplicates rows/values. This inputfile can contain 100 of this duplicated rows of... (1 Reply)
Hi ,
Can anyone help me suggesting - how to do the below trick with awk
Input
120
130
140
210
310
410
645
729
800
Output
120 130 140 (6 Replies)
Discussion started by: Indra2011
6 Replies
LEARN ABOUT DEBIAN
grd2xyz
GRD2XYZ(l) GRD2XYZ(l)
NAME
grd2xyz - Converting a grdfile to an ASCII or binary table
SYNOPSIS
grd2xyz grdfile [ -H[nrec] ] [ -L ] [ -Rwest/east/south/north[r] [ -S[r ] [ -V ] [ -Z[flags] ] [ -bo[s][n] ]
DESCRIPTION
grd2xyz reads a binary 2-D grdfile and writes out xyz-triplets in ASCII [or binary] format to standard output. Modify the precision of the
ASCII output format by editing the D_FORMAT parameter in your .gmtdefaults file, or choose binary output using single or double precision
storage. As an option you may output z-values without the (x,y) in a number of formats, see -Z below.
grdfile
The 2-D binary file to be converted.
OPTIONS -H Output 1 header record based on information in the grdfile header. Ignored if binary output is selected. [Default is no header].
-L Indicates that the x values are longitudes (necessary for -: to work).
-R west, east, south, and north specify the Region of interest. To specify boundaries in degrees and minutes [and seconds], use the
dd:mm[:ss] format. Append r if lower left and upper right map coordinates are given instead of wesn.
-S Suppress output for nodes whose z-value equals NaN [Default outputs all nodes]. Append r to reverse the suppression, i.e., only
output the nodes whose z-value equals NaN.
-V Selects verbose mode, which will send progress reports to stderr [Default runs "silently"].
-Z Write a 1-column ASCII [or binary] table. Output will be organized according to the specified ordering convention contained in
flags. If data should be written by rows, make flags start with T(op) if first row is y = ymax or B(ottom) if first row is y =
ymin. Then, append L or R to indicate that first element should start at left or right end of row. Likewise for column formats:
start with L or R to position first column, and then append T or B to position first element in a row. For gridline registered
grids: If grid is periodic in x but the outcoming data should not contain the (redundant) column at x = xmax, append x. For grid
periodic in y, skip writing the redundant row at y = ymax by appending y. If the byte-order needs to be swapped, append w. Select
one of several data types (all binary except a):
a ASCII representation
c signed 1-byte character
u unsigned 1-byte character
h short 2-byte integer
i 4-byte integer
l long (4- or 8-byte) integer
f 4-byte floating point single precision
d 8-byte floating point double precision
Default format is scanline orientation of ASCII numbers: -ZTLa. Note that -Z only applies to 1-column output.
-bo Selects binary output. Append s for single precision [Default is double]. This option only applies to xyz output; see -Z for z ta-
ble output.
EXAMPLES
To edit individual values in the 5' by 5' hawaii_grv.grd file, try
grd2xyz hawaii_grv.grd > hawaii_grv.xyz
To write a single precision binary file without the x,y positions from the file raw_data.grd file, using scanline orientation, try
grd2xyz raw_data.grd -ZTLf > hawaii_grv.b
SEE ALSO gmtdefaults(1gmt), gmt(1gmt), grdedit(1gmt), xyz2grd(1gmt)
1 Jan 2004 GRD2XYZ(l)