Unix Hackery Class

posted by chip on Monday, the twenty-third of February 2009, at a quarter till three in the morning
Pop quiz! You have five minutes to complete this test.
  1. What does the following vim regex do?
    /^\@<!^I\@<!^I/
    
  2. Write a single-line shell command that moves every file older than three weeks to another directory and gzips it. Please specify which UNIX flavor you are using.
  3. Without running it, what is the output of this perl script?
    #!/usr/bin/perl
    
    $" = "\", \"";
    @_ = ("Horse", 3, ["One", "More", "Time"], \$_[0]);
    print "$$_[3]\"@{[map{substr($_,0,3)}@_]}\"\n";
    
...Pencils down! Hand your papers forward.

reply

All content printed on 100% recycled internet memes.