<div dir="ltr"><div>Justin:  I would typically use Perl for this sort of thing, too.  It's just that in this case, the process was originally so simple that I implemented it in a bash script that was a quick SFTP get command, an "awk | sed | sed | grep -v" pipe-chain, and an SFTP put command.  I was (very coincidentally) reading about awk lately when this issue popped up.  So I hoped to use this as a learning experience.  I was starting to debate rewriting the entire thing in Perl, though.</div><div><br></div>The good news is that ​I think I it figured out in awk.  I just needed a perspective shift, which I achieved thanks to all the feedback here and elsewhere.  If pseudocode, this is what I needed to do:<div><br></div><div>if (grade_level not null) {</div><div>  # This is a student</div><div>  $primary_key = student_ID</div><div>} else {</div><div> # This is an employee</div><div>  $primary_key = employee_ID# && first_letter_of_school_name</div><div>}</div><div>print "$primary_key, $2, $3, $4"</div><div><br></div><div>Once I realized this, it was easy to add a few lines to the existing awk script using "if" and "substr()".  It appears to be working as desired now.  When I return to work on Monday, I'll check for side-effects (since I'm altering a live system) and then deploy.</div><div><br></div><div>Thanks a bunch for the thought provoking replies!</div><div><br></div><div>Jaime</div>​</div>