I have ~20 files all around 300 lines long, populated by data formatted like this:
62640 usec, 3500 usec
1640 usec, 480 usec
360 usec, 520 usec
1200 usec, 500 usec
340 usec, 520 usec
and I want to turn this into Arduino code, in the format
delayMicroseconds(62640);
pulseIR(3500);
delayMicroseconds(1640);
pulseIR(480);
delayMicroseconds(360);
pulseIR(520);
delayMicroseconds(1200);
pulseIR(500);
delayMicroseconds(340);
pulseIR(520);
and so on, where the number in the delayMicroseconds() function is the first number on each line, and the number in pulseIR() is the second number on each line.
Any ideas? I feel like this should be possible in awk.