Ghostdog74 | AWK Query
Hi,
You posted on a query I had over a data manipulation task. The code you wrote seems well structured and I would like to understand it a little more. Code:
awk 'BEGIN{OFS=FS=", " Then NR displays the first line? Then I get stuck on the substr syntax. If you could explain a little more it would be helpful. I need to amend the script so that in an event that a code's 3 characters (after the first character) are the same as another codes three characters, the 01 at the end will increment by 1. Example:- CBUPP = 02BUP01 CBUPI = 02BUP02 CBUPK = 02BUP03 At the moment the script will obviously produce the following:- 02BUP01 02BUP01 02BUP01 Thanks for the help. |
I think ghostdog74 is the first LQ member you can search in the thread titles, now! ;)
|
Bookmark & read this: http://www.grymoire.com/Unix/Awk.html
Come back if it still isn't clear. |
Quote:
Code:
if ( var=="N" ) { Quote:
|
Quote:
|
All times are GMT -5. The time now is 10:28 AM. |