01-22-2011
Ok, Thanks, I will give it a try and let you know how it works!
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I have a file which is fixed width columns. This is an offset buffer - rather than space or tab delimited. There are upto about 8 columns and I need to get all of the column 5's values into another file.
The problem is that because the delimiter is a space - and some fields are blank - the 5th... (3 Replies)
Discussion started by: peter.herlihy
3 Replies
2. Shell Programming and Scripting
Hi,
I have a file with 3 columns in it that are comma separated and it has about 5000 lines. What I want to do is find the most common value in column 3 using awk or a shell script or whatever works! I'm totally stuck on how to do this.
e.g.
value1,value2,bob
value1,value2,bob... (12 Replies)
Discussion started by: Donkey25
12 Replies
3. Shell Programming and Scripting
Here is my file name countries
USSR 8650 262 Asia
Canada 3852 24 North America
China 3692 866 Asia
USA 3615 219 North America
Brazil 3286 116 South America
India 1269 637 Asia
Argentina 1072 ... (8 Replies)
Discussion started by: ironhead3fan
8 Replies
4. Shell Programming and Scripting
Hi, been about 10 years since I've scripted, so very rusty and could use some quick help.
I have a file that contains data like such:
folder1 jondoe owner janedoe reader joeshmo none
folder2 jondoe none janedoe none joeshmo owner
folder3 jondoe owner
folder4 janedoe owner joeshmo... (7 Replies)
Discussion started by: drewpark
7 Replies
5. Shell Programming and Scripting
Can any one tell me how to get the second last column value from the text file, which has different record size for each record.
I know how to get the last column using awk and print statements, but I am unable to get the second last column value from the file. (4 Replies)
Discussion started by: naveen_sangam
4 Replies
6. Shell Programming and Scripting
Hello,
I am trying to get a script to work which will find the maximum value of the fourth column and assign that value to all rows where the first three columns match.
For example:
1111 2222 AAAA 0.3
3333 4444 BBBB 0.7
1111 2222 AAAA 0.9
1111 2222 AAAA 0.5
3333 4444 BBBB 0.4
should... (8 Replies)
Discussion started by: jaysean
8 Replies
7. Shell Programming and Scripting
I have an two arrays. One array BINDIST consists of fences. I have another array XOFFS.
Eg
BINDIST = 0 10 20 30 40 50 60
XOFFS = 2 3 4 23 25 28 55 58
I want to find to find the indices of values in XOFFS that are closest to each BINDIST.
My idea is to do as follows
I create array... (7 Replies)
Discussion started by: kristinu
7 Replies
8. Shell Programming and Scripting
Dear all,
I want to find a number in exact column but I don't know how to do it.
Here is the thing, data is shown below, and I want to find 416 in the first column and print it out, how should I deal with it? Thank you very much!
ab33 50S01S 958 279.068999 67.251013 -150.172544 67.250000... (5 Replies)
Discussion started by: handsonzhao
5 Replies
9. Shell Programming and Scripting
Please help me how can I display every nth field present in a "|" delimited file.
Ex: If a have a file with data as a|b|c|d|e|f|g|h|k|l|m|n
I want to display every 3rd feild which means the output should be
c
f
k
n
Please help me. (1 Reply)
Discussion started by: ngkumar
1 Replies
10. Shell Programming and Scripting
hi,
Am trying to find a solution for finding a null column value inside a loop using array.
for eg:
two
three
five
From the above array myarray,myarray and myarray having null values. But when am trying to check that space using some condition its not working.
for (( i=0;... (4 Replies)
Discussion started by: rogerben
4 Replies