src/AwkHandler.h
branchv_0
changeset 15 ba91a464d2b3
parent 13 b74001992ec3
child 17 54716ea44d52
equal deleted inserted replaced
14:f407f2a2871d 15:ba91a464d2b3
   190 
   190 
   191 				// AWK script:
   191 				// AWK script:
   192 				std::wstringstream awkScript;
   192 				std::wstringstream awkScript;
   193 				awkScript << L"BEGIN {" << std::endl;
   193 				awkScript << L"BEGIN {" << std::endl;
   194 				awkScript << L"FS=\"\\t\";" << std::endl;
   194 				awkScript << L"FS=\"\\t\";" << std::endl;
       
   195 				awkScript << currentRelationConfiguration->awkBeforeRecords << std::endl;
   195 				awkScript << L"};" << std::endl;
   196 				awkScript << L"};" << std::endl;
       
   197 				awkScript << std::endl;
   196 
   198 
   197 				awkScript << L"END {" << std::endl;
   199 				awkScript << L"END {" << std::endl;
   198 				// awkScript << … << std::endl;
   200 				awkScript << currentRelationConfiguration->awkAfterRecords << std::endl;
   199 				awkScript << L"};" << std::endl;
   201 				awkScript << L"};" << std::endl;
   200 
   202 				awkScript << std::endl;
   201 				awkScript << L"{print \"AWK says: line \" NR \" '\" $0 \"' has \" NF \" fields; first field is '\" $1 \"'\";}" << std::endl;
   203 
       
   204 				awkScript << currentRelationConfiguration->awkForEach << std::endl;
   202 
   205 
   203 				// CLI arguments:
   206 				// CLI arguments:
   204 				std::vector<std::string> args;
   207 				std::vector<std::string> args;
   205 				args.push_back("awk");
   208 				args.push_back("awk");
   206 
   209