Skip to content

Instantly share code, notes, and snippets.

@mchelen
Created June 25, 2010 08:13
Show Gist options
  • Save mchelen/452589 to your computer and use it in GitHub Desktop.
Save mchelen/452589 to your computer and use it in GitHub Desktop.
preg_match('/[0-9]+/', $_GET["pmcid"],$matches);
$pmc = $matches[0];
// generate list files command
$cmd = "ls $filepath/*/*-$pmc.nxml";
// run command and save results (trim whitespace)
$output = trim(shell_exec($cmd));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment