10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
I have to ascend the number of two selected columns by horizontal manner.
For example, I have a data like this in csv file (tab delimited format)
08 1 19185 18010
16 4 7960 9339
01 6 516769 517428
09 9 51384 49270
I need to ascend the two columns numbers (horizontal manner) like as... (5 Replies)
Discussion started by: dineshkumarsrk
5 Replies
2. Shell Programming and Scripting
Hello
I want to collapse a file with multiple rows into consolidated lines of entries based on selected columns as the 'key'.
Example:
1 2 3 Abc def ghi
1 2 3 jkl mno p qrts
6 9 0 mno def Abc
7 8 4 Abc mno mno abc
7 8 9 mno mno abc
7 8 9 mno j k
So if columns 1, 2 and 3 are... (6 Replies)
Discussion started by: linuxlearner123
6 Replies
3. UNIX for Advanced & Expert Users
HI,
My Input file data is
dn:adcfgeneral
id:13343
Name:xxxxxx
Password:iutyerwuitywue wpuwt
tuiytruityrutyrwtyrwp
dn:cdferwjyyyy
id:3875
Name:yyyy
Password :hgfdsjkfhdsfkdlshf
dshfkldshfdklsfh
interset:uiuiufj
My output should be
... (6 Replies)
Discussion started by: dineshaila
6 Replies
4. Shell Programming and Scripting
input:
chr1 1 2 3
chr1 1 2 4
chr1 2 4 5
chr2 3 6 9
chr2 3 6 10
Code:
awk '{a+=$4}END{for (i in a) print i,a}' input
Output:
chr112 7
chr236 19
chr124 5
Desired output:
chr1 1 2 7
chr2 3 6 19
chr1 2 4 5 (1 Reply)
Discussion started by: jacobs.smith
1 Replies
5. Shell Programming and Scripting
Dear All,
I have a data file input.csv like below. (Only five column shown here for example.)
Data1,StepNo,Data2,Data3,Data4
2,1,3,4,5
3,1,5,6,7
3,2,4,5,6
5,3,5,5,6
From this I want the below output
Data1,StepNo,Data2,Data3,Data4
2,1,3,4,5
3,1,5,6,7
where the second column... (4 Replies)
Discussion started by: ks_reddy
4 Replies
6. Shell Programming and Scripting
Hello,
I have a huge file with many columns . I want to use the names of the columns to print columns to another file.
for example
file.txt
COLA COLB COLC COLD
1 2 3 5
3 5 6 9
If I give name for multiple columns to the code:... (5 Replies)
Discussion started by: ryan9011
5 Replies
7. Shell Programming and Scripting
Looks at the most efficient way to add up the column of data based off of the rows.
Random data
Name-Number-ID
Sarah-2.0-15
Bob-6.3-15
Sally-1.0-10
James-1.0-10
Scotty-10.7-15
So I would select all those who have ID = 15 and then add up total number
read - p "Enter ID number" Num
... (3 Replies)
Discussion started by: Ironguru
3 Replies
8. Shell Programming and Scripting
Hi Experts,
The question may look very silly by seeing the title, but please have a look at it clearly.
I have a text file where the first 5 columns in each row were supposed to be attributes of a sample(like sample name, number, status etc) and the next 25 columns are parameters on which... (3 Replies)
Discussion started by: ks_reddy
3 Replies
9. Shell Programming and Scripting
Hi all,
in my csv file it'll look like this, and of course it may have more columns
US to UK;abc-hq-jcl;multimedia
UK to CN;def-ny-jkl;standard
DE to DM;abc-ab-klm;critical
FD to YM;la-yr-tym;standard
HY to MC;la-yr-ytm;multimedia
GT to KJ;def-ny-jrt;critical
I would like to group... (4 Replies)
Discussion started by: tententen
4 Replies
10. UNIX for Advanced & Expert Users
This is the data file that I have
21879, 0, 22, 58, 388
0, -1, 300, 1219172589765, 1708, 0, 200, 21891, 0, 0, 33, 309
0, -1, 300, 1219172591478, 1768, 0, 200, 22505, 0, 0, 33, 339
0, -1, 300, 1219172593251, 1738, 0, 200, 21888, 0, 1, 33, 308
0, -1, 300, 1219172594995, 633, 0, 200, 24878,... (2 Replies)
Discussion started by: pmallur
2 Replies