Daily Archives: March 26, 2008

How to get the directory location of a shell script

dirname=`dirname $0`

Tagged | Leave a comment

How to Fork in Perl

Kick off multiple processes simultaneously in Perl. my $num = 10; my @children; for (my $i = 0; $i < $num; $i++) { my $pid = fork(); if ($pid) { # parent push @children, $pid; } elsif ($pid == 0) … Continue reading

Tagged | Leave a comment