Hello! Need to extract a column from a CSV file into another CSV file. I was searching and found that using AWK could help but have no idea how to proceed.
Site link for reference
https://www.joeldare.com/wiki/using_awk_on_csv_files
Also, I was trying to create the flow given below
[{"id":"f23392c0.2a45e","type":"tab","label":"Flow 4","disabled":false,"info":""},{"id":"2d799aab.019f36","type":"http in","z":"f23392c0.2a45e","name":"","url":"/temp","method":"get","upload":false,"swaggerDoc":"","x":180,"y":120,"wires":[["66427477.4008fc"]]},{"id":"c10a2f37.5190f","type":"http response","z":"f23392c0.2a45e","name":"","statusCode":"","headers":{},"x":640,"y":120,"wires":[]},{"id":"66427477.4008fc","type":"template","z":"f23392c0.2a45e","name":"","field":"payload","fieldType":"msg","format":"html","syntax":"mustache","template":"<!DOCTYPE html>\n<html>\n <head>\n <link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/bootswatch@4.5.2/dist/slate/bootstrap.min.css\" integrity=\"undefined\" crossorigin=\"anonymous\">\n </head>\n \n<body>\n\n<h1 style=\"font-size:60px;\">Heading 1</h1>\n<h2>Heading 2</h2>\n<h3>Heading 3</h3>\n<h4>Heading 4</h4>\n<h5>Heading 5</h5>\n<h6>Heading 6</h6>\n<p>This is a paragraph.</p>\n<p>This is another paragraph.</p>\n\n<h1>This is heading 1</h1>\n<p>This is some text.</p>\n<hr>\n<h2>This is heading 2</h2>\n<p>This is some other text.</p>\n<hr>\n\n<pre>\n My Bonnie lies over the ocean.\n\n My Bonnie lies over the sea.\n\n My Bonnie lies over the ocean.\n\n Oh, bring back my Bonnie to me.\n</pre>\n\n<p>I am normal</p>\n<p style=\"color:red;\">I am red</p>\n<p style=\"color:blue;\">I am blue</p>\n<p style=\"font-size:50px;\">I am big</p>\n\n<h1 style=\"font-family:verdana;\">This is a heading</h1>\n<p style=\"font-family:courier;\">This is a paragraph.</p>\n\n<h1 style=\"font-size:300%;\">This is a heading</h1>\n<p style=\"font-size:160%;\">This is a paragraph.</p>\n\n</body>\n</html>","output":"str","x":400,"y":120,"wires":[["c10a2f37.5190f"]]},{"id":"ec51fb28.ba1e38","type":"function","z":"f23392c0.2a45e","name":"transform data","func":"//as per info panel, the data needs to be formatted\n//as [ \"Choice 1\", \"Choice 2\", {\"Choice 3\":\"3\"} ]\n//and sent in msg.options.\nmsg.options = [];//create empty array\nfor(let i = 0; i < msg.payload.length; i++)\n {\n let row = msg.payload[i]; //get the row\n let opt = {};//make new opt object\n opt[row.Work_Center] = row.Work_Center; \n msg.options.push(opt);//add the opt to array \n }\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":740,"y":360,"wires":[["849e4a87.a0a4e8"]]},{"id":"4cd838bf.b81ef8","type":"csv","z":"f23392c0.2a45e","name":"","sep":",","hdrin":true,"hdrout":"all","multi":"mult","ret":"\\r\\n","temp":"","skip":"0","strings":true,"include_empty_strings":false,"include_null_values":false,"x":550,"y":360,"wires":[["ec51fb28.ba1e38"]]},{"id":"378e748.df7018c","type":"file in","z":"f23392c0.2a45e","name":"mt02order","filename":"C:\\Users\\Sahil\\Desktop\\testing\\mt02order.csv","format":"utf8","chunk":false,"sendError":false,"encoding":"none","x":400,"y":360,"wires":[["4cd838bf.b81ef8"]]},{"id":"abbca1c8.8cf72","type":"inject","z":"f23392c0.2a45e","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":240,"y":360,"wires":[["378e748.df7018c"]]},{"id":"44b692da.1bc42c","type":"file","z":"f23392c0.2a45e","name":"work center no.","filename":"C:\\Users\\Sahil\\Desktop\\testing\\workcenter.csv","appendNewline":true,"createDir":false,"overwriteFile":"true","encoding":"none","x":1080,"y":360,"wires":[[]]},{"id":"849e4a87.a0a4e8","type":"csv","z":"f23392c0.2a45e","name":"","sep":",","hdrin":"","hdrout":"none","multi":"one","ret":"\\r\\n","temp":"","skip":"0","strings":true,"include_empty_strings":"","include_null_values":"","x":910,"y":360,"wires":[["44b692da.1bc42c"]]}]
I'm stuck here can anyone help.