---------- Post updated at 10:11 PM ---------- Previous update was at 10:09 PM ----------
Instead of tst, put your filename (*.doc , $i, or whatever )
---------- Post updated at 10:16 PM ---------- Previous update was at 10:11 PM ----------
You may want to choose another delimiter (colon for example) to avoid further parsing problem because the sequence <coma><space> also match in (Melbourne, Australia) whereas it is not supposed to be a delimiter but may be interpreted as is later... or may make further parsing tedious.
I have a file like the one given below
P1|V1|V2
P1|V1|V3
P1V1|V2
P2|V1|V4
P2|V2|V6
P2|V1|V4
I want it convert to
P1|V1|V2|V2|V3
P2|V1|V4|V2|V6
2nd and 3rd column should be considered as together and so the tird row is duplicate
Any ideas? (3 Replies)
I have 1000s of these rows that I would like to transpose to columns. However I would like the transpose every 3 consecutive rows to columns like below, sorted by column 3 and provide a total for each occurrences. Finally I would like a grand total of column 3.
21|FE|41|0B
50\65\78
15... (2 Replies)
I have to create a Perl script which will transpose the data output from my experiment, from columns to rows, in order for me to analyse the data.
I am a complete Perl novice so any help would be greatly appreciated.
The data as it stands looks like this:
Subject Condition Fp1 ... (12 Replies)
Hi, I need to transpose columns of my files into rows and save it as individual files. sample contents of the file below.
0.9120 0.7782 0.6959 0.6904 0.6322 0.8068 0.9082
0.9290 0.7272 0.9870 0.7648 0.8053 0.8300 0.9520
0.8614 0.6734 0.7910 0.6413 0.7126 0.7364 0.8491
0.8868 0.7586 0.8949... (8 Replies)
Here is the contents of an input file.
A,1,2,3,4
10,aaa,bbb,ccc,ddd
11,eee,fff,ggg,hhh
12,iii,jjj,lll,mmm
13,nnn,ooo,ppp
I wanted the output to be
A
10 1 aaa
10 2 bbb
10 3 ccc
10 4 ddd
11 1 eee
11 2 fff
11 3 ggg
11 4 hhh .....
and so on How to do it in ksh... (9 Replies)
Hi,
I am trying to transpose rows to columns for thousands of records. The problem is there are records that have the same lines that need to be separated. the input file as below:-
ID 1A02_HUMAN
AC P01892; O19619; P06338; P10313; P30444; P30445; P30446; P30514;
AC Q29680; Q29837;... (2 Replies)
Hello to all,
Please some help on this. I have the file in format as below.
How can I set the record separator as the string below in red
"No. Time Source Destination Protocol Length Info"
I've tried code below but it doesn't seem to... (6 Replies)
Hi All,
I have a requirement to flatten data out, based on the value in COL_2. Our file is pipe delimited, however COL_2 contains a comma separated string, which we would like to pivot out from one row into multiple rows. Please see my example input data below:
Input Data
... (4 Replies)
Discussion started by: RichZR
4 Replies
LEARN ABOUT MINIX
join
JOIN(1) General Commands Manual JOIN(1)NAME
join - relational database operator
SYNOPSIS
join [-an] [-e s] [-o list] [-tc] file1 file2
DESCRIPTION
Join forms, on the standard output, a join of the two relations specified by the lines of file1 and file2. If file1 is `-', the standard
input is used.
File1 and file2 must be sorted in increasing ASCII collating sequence on the fields on which they are to be joined, normally the first in
each line.
There is one line in the output for each pair of lines in file1 and file2 that have identical join fields. The output line normally con-
sists of the common field, then the rest of the line from file1, then the rest of the line from file2.
Fields are normally separated by blank, tab or newline. In this case, multiple separators count as one, and leading separators are dis-
carded.
These options are recognized:
-an In addition to the normal output, produce a line for each unpairable line in file n, where n is 1 or 2.
-e s Replace empty output fields by string s.
-o list
Each output line comprises the fields specified in list, each element of which has the form n.m, where n is a file number and m is a
field number.
-tc Use character c as a separator (tab character). Every appearance of c in a line is significant.
SEE ALSO sort(1), comm(1), awk(1).
BUGS
With default field separation, the collating sequence is that of sort -b; with -t, the sequence is that of a plain sort.
The conventions of join, sort, comm, uniq, look and awk(1) are wildly incongruous.
7th Edition April 29, 1985 JOIN(1)