![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
Confirmed User
Join Date: Feb 2003
Location: Portland
Posts: 826
|
Any Shell Coders Out There?
Hey guys! I would like to write a shell script that opens sub shells to run multiple commands at one time. What i need the script to do is start for ex: 1.php then 2.php then 3.php . Can anyone help?
Thanks in Advance!
__________________
harbinc at gmail dot com |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
Too lazy to set a custom title
Join Date: Jan 2002
Location: Holland
Posts: 9,870
|
explain a bit more...maybe i can help.
__________________
Don't let greediness blur your vision | You gotta let some shit slide icq - 441-456-888 |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
Confirmed User
Join Date: Feb 2003
Location: Portland
Posts: 826
|
I have 5 php scripts that I would like to code a shell script to run all the php scripts at the same time. I am going to create a cronjob to run the shell script instead of creating a cronjob to individually run each php script.
__________________
harbinc at gmail dot com |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 |
Confirmed User
Join Date: Jan 2002
Location: In the walls of your house.
Posts: 3,985
|
Depending on your shell...
#!/bin/sh /path/to/php /path/to/1.php /path/to/php /path/to/2.php /path/to/php /path/to/3.php
__________________
"Every normal man must be tempted, at times, to spit on his hands, hoist the black flag, and begin slitting throats." --H.L. Mencken |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 |
Beer Money Baron
Industry Role:
Join Date: Jan 2001
Location: brujah / gmail
Posts: 22,157
|
use run-parts and put them all in a directory, executable?
15 6 * * * run-parts /home/path/daily
__________________
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 | |
Confirmed User
Join Date: Aug 2003
Location: Portland, Oregon
Posts: 4,541
|
Quote:
__________________
Real. Professional. Hosting. .:Expect Nothing Less:. 320-078-843 :: www.realprohosting.com :: [email protected] |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#7 |
Registered User
Industry Role:
Join Date: Mar 2002
Location: San Diego, CA
Posts: 935
|
I think he said at the same time.. ?
Just add an ampersand after each command to put it in the background: command & You might need to redirect the output (check your shell man page): command 2>&1 >/dev/null & |
![]() |
![]() ![]() ![]() ![]() ![]() |