Edit in place or LUAU, and how? #2388
-
|
given a table fqdn,ns1,ip1
example.com,ns1.example.com,
example.com,ns1.example.net,and one looking like glue,ip
ns1.example.com,192.168.1.7I would like the output to look like fqdn,ns1,ip1
example.com,ns1.example.com,192.168.1.7
example.com,ns1,example.net,So, I want to take all glue records and if the name in the first (glue) column appears in the ns1 column of the first file I want the ip1 address to be entered, whether it is empty as in this example of not. In as few as QSV commands in a pipe as possible. If it can be done with LUAU I would greatly appreciate a pointer. I am not averse to RTFM :-)-O |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
|
I'm not sure but maybe a LEFT JOIN comes close to what you want to achieve? => |
Beta Was this translation helpful? Give feedback.
-
|
Thanks |
Beta Was this translation helpful? Give feedback.
I'm not sure but maybe a LEFT JOIN comes close to what you want to achieve?
If the first file is named fqdn.csv and the second one glue.csv:
qsv join --left ns1 fqdn.csv glue glue.csv | qsv select fqdn,ns1,ip=>