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
Hi All,
I am looking for an awk script to do the following
Join the fields together only if the first 4 fields are same.
Can it be done with join function in awk??
a,b,c,d,8,,,
a,b,c,d,,7,,
a,b,c,d,,,9,
a,b,p,e,8,,,
a.b,p,e,,9,,
a,b,p,z,,,,9
a,b,p,z,,8,,
desired output:
... (1 Reply)
Discussion started by: aksijain
1 Replies
5. Shell Programming and Scripting
Hello Everyone,
This 10th field is giving too much problem in AWK. How do i overcome ? pls suggest Thanks!
cat /tmp/data_rank| awk 'BEGIN{
print "HT No" "," "Name" "," "Maths" "," "Physics" "," "Chemistry" "," "Total" "," "Gender" "," "University" "," "RANK Global" "," "Rank... (2 Replies)
Discussion started by: InduInduIndu
2 Replies
6. Shell Programming and Scripting
Have columns with digits and strings like:
input.txt
3840 3841 3842 Dav Thun Tax
Cahn 146; Dav.
3855 3853 3861 3862 Dav Thun Tax
2780 Karl VI.,
3873 3872 3872 Dav Thun Tax
3894 3893 3897 3899 Dav Thun Tax
403; Thun 282.
3958 3959 3960 Dav Thun Tax
3972 3972 3972 3975 Dav Thun Tax... (8 Replies)
Discussion started by: sdf
8 Replies
7. Shell Programming and Scripting
Hello,
I have a text file with lines that look like this:
1974 12 27 -0.72743 -1.0169 2 1.25029
1974 12 28 -0.4958 -0.72926 2 0.881839
1974 12 29 -0.26331 -0.53426 2 0.595623
1974 12 30 7.71432E-02 -0.71887 3 0.723001
1974 12 31 0.187789 -1.07114 3 1.08748
1975 1 1 0.349933 -1.02217... (2 Replies)
Discussion started by: meridionaljet
2 Replies
8. 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
9. Shell Programming and Scripting
using awk convert 3 rd fileld of file as 5 digit and then display changed file.
like
1 2
23445 3452 3343
3 5 6 6
================
o/p:-
1 2
23445 3452 03343
3 5 00006 6 (1 Reply)
Discussion started by: RahulJoshi
1 Replies
10. Shell Programming and Scripting
Hi everybody:
I just create awk script. This script calculate the average of a field, but i want to do it for every fields.
The original field has 40 fields of numbers like that:
38.00 51.00 10.00 -99.90 75.00 47.00 4.00 -99.90 69.00 121.00 62.00 6.00 70.00 43.00 36.00 49.00 8.00 36.00 50.00... (1 Reply)
Discussion started by: tonet
1 Replies