Executing Perl or PHP scripts from the shell

Expertise level: Easy

To execute a Perl or PHP script from the shell, use this procedure:

  • Login with SSH as root.
  • Navigate to the directory where the script files are located.
cd /path/to/the/file/
  • Type this command to execute the Perl script:
perl fileName.pl
  • Type this command to execute the PHP script:
  • php fileName.php

You will get the output at the console.

Have more questions? Submit a request


Article is closed for comments.
Powered by Zendesk