09-06-2010
Transpose
TRANSPOSE
--------------------------------------------------------------------------------
i have a file with recurring fields
Start
A 1
B 2
C 3
D 4
E 5
End
Start
A 11
B 12
C 23
D 25
E 21
End
I would like to convert
A B C D E
1 2 3 4 5
11 12 23 25 21
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
Am trying to transpose a set of rows into a set of comma separated values.
For eg. if the output of
ps -ef | tail +2 | awk 'BEGIN{ FS=" " } { print $2 }'
is
0
1
3
4
I need to transpose it to -
'0','1','3','4'
Am currently trying - (4 Replies)
Discussion started by: iamwha1am
4 Replies
2. Shell Programming and Scripting
Hi all,
I have a file in the below format....
<A>
B
C
<A>
E
F
<A>
G
H
I need the result file to be:
<A>BC
<A>EF
<A>GH (3 Replies)
Discussion started by: new_ds_man
3 Replies
3. Shell Programming and Scripting
I have a requirement to transpose the below xml which is in a text file on unix:
<?xml version="1.0" ?>
<REQUEST>
<ID>XXX</ID>
<TIMESTAMP>20090720062610</TIMESTAMP>
<FLAG>Y</FLAG>
<TO_FLAG>Y</TO_FLAG>
</REQUEST>
to
<?xml version="1.0"... (13 Replies)
Discussion started by: new_ds_man
13 Replies
4. Shell Programming and Scripting
Hi ALL
I have one input file say FILE1 which looks as below.
a=1
b=2
c=3
a=4
b=5
c=6
.
.
.
Here a,b,c...etc are variable names.
The output file(FILE2) should look like
1,2,3
4,5,6
.....
..... (5 Replies)
Discussion started by: 46019
5 Replies
5. Shell Programming and Scripting
input
IndID ID1 ID2 ID3
a1 a/a b/b c/c
a2 a/a b/b c/c
a3 a/b b/b c/d
a6 a/b b/b c/e
a8 a/a b/c c/e
a9 b/b b/d c/e
output
IDName IndID IDtype C_No
ID1 a1 a/a 1
ID1 a2 a/a 1
ID1 a8 ... (1 Reply)
Discussion started by: stateperl
1 Replies
6. Shell Programming and Scripting
Hello to everyone! I'm pretty tired and I cannot concentrate properly, but I need some help!!!
I have a matrix like the one in the attachment (matrice_prova) and I would like an output like this:
L1 L1 0.0
L1 L2 2.1
L1 L3 3.1
L1 L4 3.2
....
How is it possible do that in Perl or Awk??
Any... (3 Replies)
Discussion started by: gabrysfe
3 Replies
7. Shell Programming and Scripting
Hi Folks,
My input file is like this
cat input
abcd:efgh:jklm 123,456,67,78,89,90
hi:kil:op 76,78,12,3456,
unix:linux:shell:bash 111,111
My expected output
abcd:efgh:jklm hi:kil:op unix:linux:shell:bash
123 76 111
456 78 111
67 12
78 3456
89
90 (5 Replies)
Discussion started by: jacobs.smith
5 Replies
8. Shell Programming and Scripting
Hi Friends,
Very urgent requirement
please do needful ASAP..
Input:
|1||1|1||1|3||3|2||2|4||4|2||2|3||3|NA||0|5||5|NA||0|4||4|3||3
output:
|1||1
|1||1
|3||3
|2||2
|4||4
|2||2
|3||3
|NA||0
|5||5 (4 Replies)
Discussion started by: bharat1211
4 Replies
9. UNIX for Dummies Questions & Answers
Have various files like this:
InSlot=0x00000001
InPort=0x00000000
Inref=0x0000002f
InSID=0x00000001
OutSlot=0x00000001
OutPort=0x00000002
Outref=0x00000000
OutSID=0x0000000b
OutUName_2=14
InSlot=0x00000001
InPort=0x00000000
Inref=0x000001a8
InSID=0x00000001
OutSlot=0x00000001... (5 Replies)
Discussion started by: K@rlos
5 Replies
10. UNIX for Beginners Questions & Answers
Hi All,
I have sort of a case to transpose data from rows to column
input data
Afghanistan|10000|1
Albania|25000|4
Algeria|25000|7
Andorra|10000|4
Angola|25000|47
Antigua and Barbuda|25000|23
Argentina|5000|3
Armenia|100000|12
Aruba|20000|2
Australia|50000|2
I need to transpose... (3 Replies)
Discussion started by: radius
3 Replies
LEARN ABOUT LINUX
extractor
EXTRACTOR(1) The Canonical Csound Reference EXTRACTOR(1)
NAME
extractor - Extract a section of audio from an audio file. .
DESCRIPTION
Extract a section of audio, by time or sample, from an existing sound file.
SYNTAX
extractor [OPTIONS ... ] infile
INITIALIZATION
Flags:
o -S integer = Start the extract at the given sample number.
o -Z integer = End the extract at the given sample number.
o - Q integer = Extract given number of samples.
o -T fpnum = Start the extract at the given time in seconds.
o -E fpnum = End the extract at the given time in seconds.
o -D fpnum = Extract given time in seconds.
o -v = Verbose mode.
o -R = Continually rewrite the header while writing soundfile (WAV/AIFF).
o -H integer = Show a "heart-beat" to indicate progress, in style 1, 2 or 3.
o -N = Alert call (usually ringing the bell) when finished.
o -v = Verbose mode.
o -o fname = output file name (default: test.wav)
EXAMPLES
The default values are
extractor -S 0 -Z end-of-file -otest
For example
extractor -S 10234 -D 2.13 in.aiff -o out.wav
This creates a new sound file taken from sample 10234 and lasting 2.13 seconds.
CREDITS
Author: John ffitch
1994
AUTHORS
Barry Vercoe
MIT Media Lab
Author.
Dan Ellis
MIT Media Lab,
Cambridge
Massachussetts
Author.
COPYRIGHT
5.07 06/23/2009 EXTRACTOR(1)