Search Results

Search: Posts Made By: circuitman06
7,291
Posted By circuitman06
cat all | nawk -F "|" ' BEGIN{ OFS="|"} { $5=$3"...
cat all | nawk -F "|" ' BEGIN{ OFS="|"} { $5=$3" "$4" "$NR; print $0}' > allnew

Yes, I use it properly,

Thank you all guys,,I'm really appreciated to join this forum.
7,291
Posted By circuitman06
Thank you all but I'm wondering the function of...
Thank you all but I'm wondering the function of OFS="|"

My code :

cat all | nawk' BEGIN{ FS="|"} { $5=$3" "$4" "$NR; print $0}' > allnew

There are not any pipes at allnew file.. They were...
7,291
Posted By circuitman06
My file :AAAA|BBBBBBBBBB|CCCCCC|DDDD|EEEEEE 5...
My file :AAAA|BBBBBBBBBB|CCCCCC|DDDD|EEEEEE 5 field

To : AAAA|BBBBBBBBBB CCCCCC CCCCCC|BBBBBBBBBB|CCCCCC|DDDD|EEEEEE 6 fiekd

Is that clarify a little bit more ?
7,291
Posted By circuitman06
Add a column to a file with nawk
Hi all, I'm new at forum, I cant find an answer to my problem so ,

I need a file which has pipe as a file separator and I need to add a column to a file in the third column I write this code but...
Showing results 1 to 4 of 4

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