Tuesday 14 August 2018

Run PHP Files From the Command Line

I've been brushing up on my shell scripting lately. I just got a MacBook and never felt compelled to spend too much time with Cygwin. I'm learning quite a bit now but there are still some tasks that I'd need to accomplish sooner rather than later. I know how to accomplish the task using PHP so I've got that to my advantage. What's awesome is that I can quickly and easily run my PHP files from the command line.


The Shell Script
php doTask.php
I'm not sure whether I consider using PHP instead of a straight shell script as being resourceful or using PHP as a crutch. What are your thoughts?

0 comments:

Post a Comment