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
Hallo Team,
I would like to replace filed 4 and 7 with filed 39 how can i achieve this ?
-bash-3.2$ cat dip1.csv| cut -f4,7,24,36,39 -d","|sort -u
+27113996891,+27113996891,196.35.130.52,828854047,+27873500077
+27116452690,+27825702918,10.0.109.13:5060,+27116452690,+27116452690... (2 Replies)
Discussion started by: kekanap
2 Replies
3. 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
4. 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
5. 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
6. Shell Programming and Scripting
Hi all,
say for example i have the next input file
30
Au 7.500000 7.500000 5.774000
Au 7.500000 8.995000 8.363000
Au 7.500000 6.005000 8.363000
Au 20.633000 7.500000 9.226000
Au 20.632000 6.005000 6.637000
Au 20.632000 ... (4 Replies)
Discussion started by: ezitoc
4 Replies
7. Shell Programming and Scripting
Hi!
I have a file somefile.txt:
12, 1, a, b, c, d, e, f
12, 1, a, b, c, d, e, f
17, 51, a, b, c, d, e, f
...
I've made this script to read two fields from a line and output a third:
cat somefile.txt | awk -F, '{if ($1 == "12" && $2== "1")
print "19";
else if ($1 == "17" && $2== "51")... (8 Replies)
Discussion started by: Tr0cken
8 Replies
8. Shell Programming and Scripting
I have two files with ids and email addresses. File 2 cotains a subset of the records in file 1. The key field is the first field containing the id.
file 1:
123|myadr@abc.com
456|myadr2@abc.com
789|myadr3@abc.com
file 2:
456|adr456@xyz.com
Where the record appears in the second... (3 Replies)
Discussion started by: tltroy
3 Replies
9. 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
10. UNIX for Dummies Questions & Answers
All
I have a very large file (aproximately 150,000) as shown below separated by pipe "|". I need to replace data in 2, 16, 17, 23 fields that are of time stamp format. My goal is to look in those fields and it ends with "000000|" then replace it with "000|". In other words, make it as 6 digit... (2 Replies)
Discussion started by: ddraj2015
2 Replies