Page 1 of 1
Shell scripting or PHP?
Posted: Fri Apr 25, 2008 4:17 pm
by alex.barylski
I guess shell scripting is language independent cause I've seen examples use Python and Perl...
I'm curious though, when you need some simple script but it's complex enough to warrant conditional logic and not just chaining several commands togather, do you use the Bash scripting language or just go with PHP to get the job done?
Basically, I'd like to know if there are instances where Bash scripting would be easier -- can you provide a example?
Re: Shell scripting or PHP?
Posted: Fri Apr 25, 2008 5:29 pm
by VladSun
Most probably, *sh language would be enough, unless superior to PHP when it comes to shell scripting (especialy for automating neetwork/system administration).
Examples ... a lot of

Re: Shell scripting or PHP?
Posted: Fri Apr 25, 2008 5:42 pm
by RobertGonzalez
Since I am stronger at PHP I use it to write CLI scripts. I have a coworker who is very skilled in bash scripts so he writes those. Another co-worker of mine uses Awk because she is very strong in that.
Ultimately I would say use what you are comfortable doing.
Re: Shell scripting or PHP?
Posted: Tue Apr 29, 2008 11:29 am
by Maugrim_The_Reaper
I use Perl or Ruby for scripting - problem with PHP is that it's not well designed for a scripting language on the shell. It's good enough if that's what you prefer as a language, but Perl and Ruby have it beat.
Re: Shell scripting or PHP?
Posted: Tue Apr 29, 2008 11:53 am
by RobertGonzalez
Perl hurts my brain. I haven't been in it for at least five years and no one else in the shop has either.
If I had the time to learn it again I would totally go Perl for shell script processing because as a file system level language it is hard to beat. But I am very profficient, fast and comfortable with PHP so that is what I use.