Tuesday, 3 March 2015

eclipse shortcuts

Ctrl-Shift-O   Remove unused imports

Ctrl-Shift-R Open Resource

Ctrl-Shift-O  Open a resource search dialog to find any class


http://www.shortcutworld.com/en/win/Eclipse.html

UNIX sort

sortRequestFiles("/tmp/input");

sub sortRequestFiles {
$INPUT_DIR = $_[0];

my @files = glob( "$INPUT_DIR/request*" );

foreach (@files ){
   print "Sorting " . $_ . "\n";
   qx/head -n1 $_ > $_.tmp/;
    qx/tail -n +2 $_ | sort -k1,1 -nk2 >> $_.tmp/;
    qx/mv $_.tmp $_/;
  
    }

           }