I have a bash script abcd.sh
abcd.sh
#!/bin/sh for i in `seq 8`; do ssh w$i \'uptime;ps -elf|grep httpd|wc -l;free -m;mpstat\'; done & pid=$! sleep 1 ki
Why don't you write the entire shell script in PHP?
#!/usr/bin/php
(code is untested, just an example)