oldmanstan
December 11th, 2006, 07:45 AM
so i basically want my php command line script to be able to accept one of its arguments from a shell pipe, like grep, for instance:
ls | grep .jpg
sorts out all the jpegs in the output from ls
i want to be able to do something similar but instead of grep, with my php script, for instance:
ls | grep .jpg | myscript.php
or some such business (that's actually accurate since the script resizes jpeg files)
i tried google but i can't think of specific enough search terms, i get a lot of unrelated matches, thanks!
ls | grep .jpg
sorts out all the jpegs in the output from ls
i want to be able to do something similar but instead of grep, with my php script, for instance:
ls | grep .jpg | myscript.php
or some such business (that's actually accurate since the script resizes jpeg files)
i tried google but i can't think of specific enough search terms, i get a lot of unrelated matches, thanks!