Every time I use any of PHP's built in exec() functions it launches sh, which on my Ubuntu server is symlinked to dash. I have added: Code: #!/bin/bash to the top of my .sh file, and even told PHP to exec("bash myScript.sh"); but still no dice. I'd love to just have all of my scripts execute using bash instead of sh. tips? advice?
Works beautifully: PHP: $arp = exec("/usr/sbin/arp -a|sed 's/ /,/g'>arp.csv", $output, $exit_code); Lesson: don't name your output files the same as the command you use to get them!