yerruhari
asked on
print using awk or sed or any other means
I got a input file with the following data which contains 2 lines with 9 fields, each field seperated by tilde
id=123,abc,def~45678~12~~f irstname~i d2=234,bcd ,def~examp le@mail.co m~secondna me~id3,345 ,567~examp le2@mail.c om
id=879,bac,efa~98678~13~ac count~firs tname~id2= 314,bcd,de f~example3 @mail.com~ secondname ~id3,345,5 67~example 3@mail.com
I need the output file in the required format
id=123~45678~12~~firstname ~id2=234~e xample@mai l.com~seco ndname~id3 ~example2@ mail.com
id=879~98678~13~account~fi rstname~id 2=314~exam ple3@mail. com~second name~id3~e xample3@ma il.com
In the output file please note that id,id2,id3 need to print only untill the first comma. Also note that 4th field in first line is empty so there is nothing in between the tilde's. Please do consider that missing fields. As my data has more than 1000 lines of data.
Thanks in advance
id=123,abc,def~45678~12~~f
id=879,bac,efa~98678~13~ac
I need the output file in the required format
id=123~45678~12~~firstname
id=879~98678~13~account~fi
In the output file please note that id,id2,id3 need to print only untill the first comma. Also note that 4th field in first line is empty so there is nothing in between the tilde's. Please do consider that missing fields. As my data has more than 1000 lines of data.
Thanks in advance
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.