10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Convert Single column to multiple rows
file a.txt contains data like below
Server=abc
Run=1
Tables=10
Sessions=16
Time=380
Jobs=5
Server=abc
Run=2
Tables=15
Sessions=16
Time=400
Jobs=5
Server=abc
Run=3
Tables=20
Sessions=16
Time=450 (5 Replies)
Discussion started by: sol_nov
5 Replies
2. Shell Programming and Scripting
I am looking to print the data in columns and after every 3 words it should be a new row.
cat example.out | awk 'END { for (i = 0; ++i < m;) print _;print _ }{ _ = _ x ? _ OFS $1 : $1}' m=1| grep -i INNER
I am looking to print in a new line after every 3 words.
... (2 Replies)
Discussion started by: lazydev
2 Replies
3. Shell Programming and Scripting
Dear fellows, I need your help.
I'm trying to write a script to convert a single column into multiple rows.
But it need to recognize the beginning of the string and set it to its specific Column number.
Each Line (loop) begins with digit (RANGE).
At this moment it's kind of working, but it... (6 Replies)
Discussion started by: AK47
6 Replies
4. Shell Programming and Scripting
Hi Gurus,
How to convert rows in to columns using linux shell scripting
Input is like (sample.txt)
ABC
DEF
GHI
JKL
MNO
PQR
STU
VWX
YZA
BCD
output should be (sampleoutput.csv)
ABC,DEF,GHI,JKL,MNO
PQR,STU,VWX,YZA,BCD (2 Replies)
Discussion started by: infasriniit
2 Replies
5. Shell Programming and Scripting
hi,
i have the file as below:
abc
def
ghi
jkl
i want the output as
abc,def,ghi,jki
please reply,
Thanks (4 Replies)
Discussion started by: namitai
4 Replies
6. Shell Programming and Scripting
Hi
I have a ksh script which gives me the output as a single column with several rows like:
AAA
BBB
CCC
DDD
EEE
FFF
GGG
HHH
III
I want to be able to create a new file from this file which allows me to set the number of rows and columns in the new file, i.e. for this example, if I... (30 Replies)
Discussion started by: pinpe
30 Replies
7. Shell Programming and Scripting
Hello All,
Please help me with this file.
My input file (Tab separated) is like:
Abc-01 pc1 -0.69
Abc-01 E2cR 0.459666666666667
Abc-01 5ez.2 1.2265625
Xyz-01 pc1 -0.153
Xyz-01 E2cR 1.7358
Xyz-01 5ez.2 2.0254
Ced-02 pc1 -0.5714
Ced-02 ... (7 Replies)
Discussion started by: mira
7 Replies
8. UNIX for Advanced & Expert Users
Hi
I want to convert multiple rows ro single row ,I have tried with below one but I am not getting what I am expecting.Please any idea
a.txt
conn1=stg
conn2=dev
path=\xxx\a1.txt
fre=a
conn1=stg
conn2=dev
path=\xxx\a2.txt
freq=a
awk '/a/{ORS=" "}{print}END{print "\n"}'... (5 Replies)
Discussion started by: akil
5 Replies
9. Shell Programming and Scripting
Hi guys
Could anyone advise me how to convert my rows into columns from a file
My file would be similar to this:
A11 A12 A13 A14 A15 ... A1n
A21 A22 A23
A31
A41
A51
...
Am1 Am2 Am3 Am4 Am5 ... Amn
The number of rows is not the same to the number of columns
Thanks in advance (2 Replies)
Discussion started by: loperam
2 Replies
10. Shell Programming and Scripting
Hi,
I need a shell script for below requirement
Input file
P1 - 173310
P2 - 173476
P3 - 173230
P4 - 172737
P1 - 173546
P2 - 173765
P3 - 173876
P4 - 172989
Out put file
P1 173310 173546
P2 173476 173765
P3 173230 173876
P4 172737 172989
Suresh (6 Replies)
Discussion started by: suresh3566
6 Replies