Search Results

Search: Posts Made By: dickie.sanders
2,673
Posted By RudiC
I thought of that as well; one gsub should...
I thought of that as well; one gsub should suffice:awk 'FNR==NR{T[$1]=$0; gsub($1", *|, *$","",T[$1]); next} {print $0 " - " T[$1]}' FS=, file2 FS=" " file1
2,673
Posted By Aia
Perhaps a small addition to remove the training...
Perhaps a small addition to remove the training spaces and that pesky dangling `,'

wk 'FNR==NR{T[$1]=$0; gsub($1", *","",T[$1]); sub(/[, ]*$/, "", T[$1]); next} {print $0 " - " T[$1]}' FS=,...
2,673
Posted By RudiC
Please use code tags as required by forum rules! ...
Please use code tags as required by forum rules!

Tryawk 'FNR==NR{T[$1]=$0; gsub($1", *","",T[$1]); next} {print $0 " - " T[$1]}' FS=, file2 FS=" " file1
UNIQUENAME 2013-12-06 11:23:48.1 -...
Showing results 1 to 3 of 3

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