Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
11-05-2004, 05:55 PM
|
#1
|
Member
Registered: May 2003
Location: NC, USA
Distribution: Slackware 14.0
Posts: 94
Rep:
|
php command line scripts
I just discovered that php can be used to write shell scripts. Anyone ever try this?
php command line
|
|
|
11-05-2004, 06:10 PM
|
#2
|
Senior Member
Registered: May 2001
Location: Indiana
Distribution: Gentoo, Debian, RHEL, Slack
Posts: 1,555
Rep:
|
Most web developers use this as well as the DB connecting functions to create dynamic contect generation.
|
|
|
11-07-2004, 01:07 PM
|
#3
|
Member
Registered: Mar 2004
Posts: 41
Rep:
|
This is a rather excellent feature of PHP, and it really makes sense when:
- You have an existing body of code that you are running within your webserver, and you want to leverage that when writing maintenance scripts, e.g. cron jobs.
- You're an experienced PHP developer, but are not familar enough with the UNIX shell, or other scripting options languages like Perl and Python.
|
|
|
11-08-2004, 11:34 PM
|
#4
|
Member
Registered: Oct 2004
Location: Costa Rica
Distribution: Mandrake 9.1
Posts: 30
Rep:
|
How does this work? I heard about it but i have no idea how that goes.
|
|
|
11-09-2004, 07:05 AM
|
#5
|
Member
Registered: May 2003
Location: NC, USA
Distribution: Slackware 14.0
Posts: 94
Original Poster
Rep:
|
Quote:
How does this work? I heard about it but i have no idea how that goes.
|
See here
Last edited by naflan; 11-09-2004 at 07:07 AM.
|
|
|
11-09-2004, 08:02 AM
|
#6
|
Senior Member
Registered: Jul 2004
Distribution: Slackware
Posts: 2,140
|
It is good to test quickly some php code...
Code:
php -r 'echo str_replace("borks", "rocks", "php in command line borks")."\n";'
Last edited by Cedrik; 11-09-2004 at 08:03 AM.
|
|
|
All times are GMT -5. The time now is 12:02 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|