GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Any Shell Coders Out There? (https://gfy.com/showthread.php?t=234569)

RainMailer 02-11-2004 08:19 AM

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!

grumpy 02-11-2004 08:25 AM

explain a bit more...maybe i can help.

RainMailer 02-11-2004 08:29 AM

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.

NetRodent 02-11-2004 08:40 AM

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

Brujah 02-11-2004 09:03 AM

use run-parts and put them all in a directory, executable?

15 6 * * * run-parts /home/path/daily

com 02-11-2004 09:04 AM

Quote:

Originally posted by NetRodent
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

what he said, then cron it

Big E 02-11-2004 09:19 AM

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 &


All times are GMT -7. The time now is 06:14 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123