May. 26th, 2008

a puzzle

May. 26th, 2008 12:22 am
zwol: ((mad) science)
Given two shell variables, A and B, each of which is a space-separated list of numbers, how would you iterate over the lists in parallel, comparing each pair? That is, compare number A1 to number B1, A2 to B2, and so on. You may not use features not available on old systems (such as functions, arrays, and local variables) and you may not mess with the positional parameters. Comprehensibility is not important.

April 2017

S M T W T F S
      1
2345678
9101112131415
16171819 202122
23242526272829
30      

Page Summary

Style Credit

Expand Cut Tags

No cut tags
Page generated Jan. 4th, 2026 08:43 pm
Powered by Dreamwidth Studios