Search Results

Search: Posts Made By: Scott
4,752
Posted By Scott
Hi. Your data still doesn't seem right,...
Hi.

Your data still doesn't seem right, but..


awk -F+ -vOFS=+ '{if( /^"/ ) $5=$6="\"XXX\""; else $4=$5="\"XXX\""}1' file

1232+"32"+"932"+"XXX"+"XXX"+"23"+...
4,752
Posted By Scott
Your sample data and expected output for the...
Your sample data and expected output for the SECOND REQUIREMENT doesn't make any sense...

Where does that in red come from?

"LP232"+"40"+"932"+"436U"+"XXX"+"XXX"+"23"...
4,752
Posted By Scott
If THESE ARE THE QUESTIONS you wanted answered,...
If THESE ARE THE QUESTIONS you wanted answered, WHY DIDN'T YOU ASK THEM originally?
4,752
Posted By Scott
awk -F, -v OFS=, 'NR > 1 && $4 = " XXX"' file ...
awk -F, -v OFS=, 'NR > 1 && $4 = " XXX"' file


edit: oops, forgot about the header

awk -F, -v OFS=, 'NR==1; NR > 1 && $4 = " XXX"'
Showing results 1 to 4 of 4

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