10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have tab delimited input that prints out in the format below:
I am trying to add field headers to $5 and $6. Not sure if sed is the best tool but my attempt is below. Thank you :).
$5 = REF
$6 = ALT
file
ID CHR START STOP
123 1 100 200 A ... (6 Replies)
Discussion started by: cmccabe
6 Replies
2. Shell Programming and Scripting
Hi Friends,
Below is my input file with "|" (pipe) as filed delimiter:
My Input File:
HDR|F1|F2||||F6|F7
I want to inser values in the record for field 4 and field 5.
Expected output
HDR|F1|F2||F4|F5|F6|F7
I am able to append the string to the end of the record, but not in between the... (3 Replies)
Discussion started by: Ajay Venkatesan
3 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,
Is there any short method to print from a particular field till another filed using awk?
Example File:
File1
====
1|2|acv|vbc|......|100|342
2|3|afg|nhj|.......|100|346
Expected output:
File2
====
acv|vbc|.....|100
afg|nhj|.....|100 (8 Replies)
Discussion started by: machomaddy
8 Replies
5. Shell Programming and Scripting
sample file (comma as field separators)
MessageFlow,1,BusIntBatchMgr,a
OOBEvent,1,BusIntBatchMgr,a
TaskEvents,1,,a
MTTrace,1,,a
MTWarning,,1,a
MessageFlow,1,Batch,a
OOBEvent,1,Batch,a
TaskEvents,1,,a
EAISAPIdocWizard,1,BusIntMgr,a
EAISAPBAPIWizard,1,BusIntMgr,a... (3 Replies)
Discussion started by: vrclm
3 Replies
6. Shell Programming and Scripting
How do I print all the fields of a record except for the $(NF) field? (4 Replies)
Discussion started by: locoroco
4 Replies
7. Shell Programming and Scripting
When parsing multiple fields in a file using AWK, how do you group by one of the fields and parse by delimiters?
to clarify
If a file had
tom | 223-2222-4444 , randofield
ivan | 123-2422-4444 , random filed
... | and , are the delimiters ...
How would you group by the social security... (4 Replies)
Discussion started by: Josef_Stalin
4 Replies
8. Shell Programming and Scripting
Dear All,
I would like to add values of a field, if the lines match in a certain field. Then I would like to divide the sum though the number of lines that have a matched field. This is the Input:
Input:
Test1 5
Test1 10
Test2 2
Test2 5
Test2 13
Test3 4
Output:
Test1 7.5
Test1 7.5... (6 Replies)
Discussion started by: DerSeb
6 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. Shell Programming and Scripting
Dear All,
I have the following input file. I want to replace data with null values.
I/P File:
9022334455|2008-12-06 06:10:21|2|Error@@@|esoo8erp|
9024334432|2008-12-06 08:40:59|6|Error@@@|6y2o8e6r|
O/P File:
9022334455||2||esoo8erp|
9024334432||6||6y2o8e6r|
... (4 Replies)
Discussion started by: hanu_oracle
4 Replies