The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
PL/SQL function from shell script KrishnaSaran Shell Programming and Scripting 0 06-20-2008 03:48 AM
Problem with a function in a shell script neeto Shell Programming and Scripting 3 05-21-2008 11:53 AM
how can i call a function in shell script rajesh.P Shell Programming and Scripting 4 01-17-2008 01:24 AM
calling one function from another shell script trichyselva UNIX for Dummies Questions & Answers 1 01-17-2008 12:28 AM
getting the value of a c function in shell script surjyap Shell Programming and Scripting 1 09-27-2005 05:33 AM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 12-08-2008
daydreamer daydreamer is offline
Registered User
  
 

Join Date: Dec 2008
Posts: 16
PHP function in a shell script

Hi.

I am writing a shell script for Ubuntu linux.

Eventually I want my script to run every 10 mins via cron.

This is what I am trying to do:

php file:
connect to mysql database
get the last row input
check date against previously saved date (on last run)
if date>previous
return true
else
return false


Basically if a new row is inserted return true else return false


Shell script:
Run php file and get response <<<<<
if true
run some code
else
exit



How do I run a PHP file and get the response of true or false in the shell script?

Thanks.
 

Bookmarks

Tags
mysql, php, script, shell, shell script, shell scripting, unix scripting, unix scripting basics

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 12:08 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0