Search Results

Search: Posts Made By: Sathyapts
3,824
Posted By Sathyapts
Try: awk '{for(i=1; i<=NF; i+=2)...
Try:
awk '{for(i=1; i<=NF; i+=2) gsub(/\|/,x,$i)}1' FS=\" OFS=\" file

Sathya: This worked for me. Thank you.
or

awk 'NR%2{gsub(/\|/,x)}1' RS=\" ORS=\" file
3,824
Posted By Sathyapts
Nope does not
Nope does not
3,824
Posted By Sathyapts
I am trying to keep the pipe symbol between the...
I am trying to keep the pipe symbol between the quotes

I have tried these, still not getting the expected results.

sed -e ':a;s/^\(\(\(["]\)[^\3]*\3\|[^"]*\)*\)|/\1/;ta' data_file_name

awk...
1,403
Posted By Sathyapts
Remove pipe(|) symbol ina file, except the ones which are enclosed in double quotes
I have file with are delimited by pipe(|) symbol, I wanted those to be removed except the ones which are enclosed in double quotes.

If your quote file is:
|Life is |Beautiful"|"Indeed life |is...
3,824
Posted By Sathyapts
Remove pipe(|) symbol in except the ones which are enclosed in double quotes
I have file with are delimited by pipe(|) symbol, I wanted those to be removed except the ones which are enclosed in double quotes.

If your quote file is:
|Life is |Beautiful"|"Indeed life |is...
Showing results 1 to 5 of 5

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