<html><head>
<meta name="Generator" content="Novell Groupwise Client (Version 14.0.2 Build: 120664)">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head>
<body style="font: 10pt/normal Segoe UI; font-size-adjust: none; font-stretch: normal;"><div class="GroupWiseMessageBody" id="GroupWiseSection_1444175483000_klarson@k12group.net_59511A0513870000BD1BF681F57056B0_"><div>I think that awk is the right tool, but I'm open to a better solution if there is one.</div><div><br></div><div>I have a .csv format file that I want to split into two files based on the value found in one of the columns. For discussion purposes, say that the file has several different values about a person. FirstName, LastName, Phone, DOB and Gender. The file does have a header row. I would like two files, one with all entries where gender is M and another file where gender is F. I would like the header row in both files if possible. The key is that I want the row to be kept completely intact with the delimiters remaining in place.</div><div><br></div><div>Any suggested solutions? Ideally, I want something that can be done in a bash script so that I can run this on a nightly schedule.</div><div><br></div><div>Keith Larson<br></div></div></body></html>