IBM Interview Question

some basic unix, shell scripting and perl, asked about the expectation, logical reasoning, had to write some scripts and algorithms for the problem the panel had given.