perl -e ' $fname = 'test.txt'; $base = (split(/./,$fname))[0]; print "$base\n";' [download]
test [download]
In reply to Getting a base name by Anonymous Monk