10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi
I have a file as below
<field1> <field2> <field3> ... <field_num1> <field_num2>
Trying to sort based on difference of <field_num1> and <field_num2> in desceding order and print all fields.
I tried this and it doesn't sort on the difference field .. Appreciate your help.
cat... (9 Replies)
Discussion started by: newstart
9 Replies
2. Shell Programming and Scripting
I'm trying to compare 2 files for differences in a selct number of fields. When differnces are found it will write the whole record of the second file including appending '|C' out to a delta file. Each record will have 20 fields, but only want to do comparison of 1st 15 fields. The 1st field of... (7 Replies)
Discussion started by: sljnk
7 Replies
3. Shell Programming and Scripting
Hi experts,
I need to print the first field first then last two fields should come next and then i need to print rest of the fields.
Input :
a1,abc,jsd,fhf,fkk,b1,b2
a2,acb,dfg,ghj,b3,c4
a3,djf,wdjg,fkg,dff,ggk,d4,d5
Expected output:
a1,b1,b2,abc,jsd,fhf,fkk... (6 Replies)
Discussion started by: 100bees
6 Replies
4. Shell Programming and Scripting
Hello Friends,
I just need a small help, I need an awk program which can join 2 fields of different files which are having one common field into one file.
File - 1
FileName~Size
File- 2
FileName~Date
I need the output file in the following way
O/P- File
FileName~Date~Size
For... (4 Replies)
Discussion started by: abhisheksunkari
4 Replies
5. UNIX for Dummies Questions & Answers
Hi
I have 2 files as below
File 1
Chr Start End
chr1 120 130
chr1 140 150
chr2 130 140
File2
Chr Start End Value
chr1 121 128 ABC
chr1 144 149 XYZ
chr2 120 129 PQR
I would like to compare these files using awk; specifically if column 1 of file1 is equal to column 1 of file2... (7 Replies)
Discussion started by: sshetty
7 Replies
6. Shell Programming and Scripting
Hi All,
I want to remove the rows from File1.csv by comparing the columns/fields in the File2.csv. I only need the records whose first column is same and the second column is different for the same record in both files.Here is an example on what I need.
File1.csv:
RAJAK|ACTIVE|1... (2 Replies)
Discussion started by: rajak.net
2 Replies
7. Programming
Hi,
I have two files formatted as following:
File 1: (user_num_ID , realID) (the NR here is 41671)
1 cust_034_60
2 cust_80_91
3 cust_406_4
..
..
File 2: (realID , clusterNumber) (total NR here is 1000)
cust_034_60 2
cust_406_4 3
..
.. (11 Replies)
Discussion started by: amarn
11 Replies
8. Shell Programming and Scripting
My input is as below:
1|2|3|a02 test|303
2|2|4|1002 a05 ind|303
4|3|5|ind|30
Output
1|2|3|a02test|303
2|2|4|a05ind|303
4|3|5|ind|30
I used command:
I am getting above output. Is there any simple way using awk to acheive this.
Thanks.
Please use code tags! (6 Replies)
Discussion started by: Jairaj
6 Replies
9. Shell Programming and Scripting
Hello,
I have a file with two fields. The first field repeats itself for quite a while but the second field changes. What I want to do is to go through the first column until its value changes (and while it doesn't, verify that the second field is in a sequence from 0-15).
Example input:
... (13 Replies)
Discussion started by: acsg
13 Replies
10. Shell Programming and Scripting
I'm working on formatting some attendance data to meet a vendors requirements to upload to their system. With some help on the forums here, I have the data close. But they've since changed what they want.
The vendor wants me to submit three fields to them. Field 1 is the studentid field,... (4 Replies)
Discussion started by: axo959
4 Replies