Search Results

Search: Posts Made By: BrahmaNaiduA
1,977
Posted By BrahmaNaiduA
Repalce pipe between double quotes with \| using sed or awk comamnd
my code snippet is working fine. PFB result.
awk '{if(NR%2-1)gsub(/\|/,"#%@#%@#%@"); else if(!NF) $0=RS $0}1' RS=\" ORS= file.txt |sed -e 's/[\"]$//' -e 's/[ \t]*|[ \t]*/|/g' -e '/^$/d'...
1,977
Posted By BrahmaNaiduA
Replace delimeter between quotes with \| using sed or awk
I've a pipe delimited data in a file of size 3GB. if the text data conatins pipe delimiter that will be enclose with double quotes. I have to replace delimiter which exists between double quotes...
1,927
Posted By BrahmaNaiduA
sed command errors
When try to execute the sed command from shell script I'm getting the below error



sed command used: sed -e 's/[\"]$//' -e 's/[ \t]*|[ \t]*/|/g' -e '/^$/d'`
sed: -e expression #1, char 840:...
4,346
Posted By BrahmaNaiduA
Don, I'll have such type of fields in my...
Don,

I'll have such type of fields in my file so many. so thats why i'm requesting for suggestions to do it in a efficient way.

Thanks,
Brahma
1,968
Posted By BrahmaNaiduA
awk command suggestions
I've defined the order of elements which needs to be print in a order in a variable. please let me know how can I use it in awk command
...
4,346
Posted By BrahmaNaiduA
this won't solve my problem.. some how the awk...
this won't solve my problem.. some how the awk should not consider \| as a delimiter and swap the columns.
4,346
Posted By BrahmaNaiduA
In my pre-processing stage data contains...
In my pre-processing stage data contains delimiter i'm replacing it as \| and when I try to swap the columns I'm not getting the proper results

Below is the code I'm using to swap the columns.

...
4,346
Posted By BrahmaNaiduA
Shuffle Columns in Pipe delimited data
My sample data contains escape characters followed by delimiter. I'm stuck in writing awk comand to swap the columns. please help me out.



Sample Data: 12345678|ABN\|XYZ MED CHEM PTY....
1,502
Posted By BrahmaNaiduA
the output is not in the expected format. ...
the output is not in the expected format.

Expected Output:
a|c|3
b|d|4
c|a|1
d|b|2
e|e|5
f|g|7
g|f|6
k|h|9
|i|
|k|

Column 3: explanation for your understanding:

column-1 value...
1,502
Posted By BrahmaNaiduA
No. the current command giving sequence.. of each...
No. the current command giving sequence.. of each row I'm not looking like that. The output should be like this

a|c|3 explanation: means -- column-1 value "a" presents in column-2 at 3...
1,502
Posted By BrahmaNaiduA
Identify the First Column Position in Second Column and add the position value
Identify the First Column Position in Second Column and add the position value in 3rd column.



Sample data:
a|c
b|d
c|a
d|b
e|e
f|g
g|f
|h
|i
Expected Output:

a|c|1
b|d|2...
12,795
Posted By BrahmaNaiduA
Thanks for your quick suggestions. How to...
Thanks for your quick suggestions. How to shuffle the columns as well


Sample Data:
Sample Data: 12345678|ABN\|XYZ MED CHEM PTY. LTD.|C||100.00|22|AB"C\|Corp|"XYZ|CDEF"|

Expected Output...
12,795
Posted By BrahmaNaiduA
How can I extract the data also in the below...
How can I extract the data also in the below specified expected format using awk


Sample Data: 12345678|ABN\|XYZ MED CHEM PTY. LTD.|C||100.00|22|AB"C\|Corp|"XYZ|CDEF"|

Expected Output:
...
12,795
Posted By BrahmaNaiduA
Thanks for helping me out in it.
Thanks for helping me out in it.
12,795
Posted By BrahmaNaiduA
Thanks for the quick response. can you please...
Thanks for the quick response. can you please provide the same in awk command.
12,795
Posted By BrahmaNaiduA
Count The Number Of Delimiters using awk or better
What to know the way to count the number of delimiters in each record by ignoring the escape delimiters.


Sample Data:
12345678|ABN\|XYZ MED CHEM PTY. LTD.|C||100.00|22|AB"C\|Corp|"XYZ|CDEF"|
...
3,070
Posted By BrahmaNaiduA
Thanks for the quick response. I don't want...
Thanks for the quick response.

I don't want single quote also in the output. please help me out and explain the script which you have provided.

Also please let me know how to eliminate the...
3,070
Posted By BrahmaNaiduA
Skip the delimiter with in double quotes and count the number of delimiters during data extract
Hi All,

I'm stuck-up in finding a way to skip the delimiter which come within double quotes using awk or any other better option. can someone please help me out.

Below are the details:
...
Showing results 1 to 18 of 18

 
All times are GMT -4. The time now is 10:28 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy