10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Linux System having all Perl, Python, PHP (and Ruby) installed
From a Shell script, can call a Perl, Python, PHP (or Ruby ?) file
eg
eg
a Shell script run in a case statement call to run a php file, also Perl or/and Python file???
Like
#!/usr/bin/bash
....
....
case $INPUT_STRING... (1 Reply)
Discussion started by: hoyanet
1 Replies
2. UNIX for Dummies Questions & Answers
Hi All,
I have a script, I want to make sure the script should check whether the day is sunday, only then it should run, if it is run other days it should check and exit the script.
Kindly help.
Thanks in Advance !! (41 Replies)
Discussion started by: nanz143
41 Replies
3. Shell Programming and Scripting
Hi,
I've to wait until a file generated and once its generated, source another script in Linux terminal.
Please help me as this is very very urgent.
The code should be something like
if ( -e "/abc/xyz/a.txt )
source aaa.csh
else
sleep
This should be repeated till the if... (4 Replies)
Discussion started by: kumar_eee
4 Replies
4. Shell Programming and Scripting
Hi all,
I have a script that can be run via cron or via the command line.
Is there any way that I can place something on the script to be able to distinguish/differentiate whether the script was run via a user in the command line or whether it was run from the cron? (3 Replies)
Discussion started by: newbie_01
3 Replies
5. Shell Programming and Scripting
Hi I m running a php file in Unix shell
it says php cpmmnad not found
bash-3.2$ cat echo.php
<? php
echo"heelo world"
>?
bash-3.2$ php echo.php
bash: php: command not found
actually I want to change certain thing a in a website using php script so I m beginner and trying... (6 Replies)
Discussion started by: manigrover
6 Replies
6. Shell Programming and Scripting
I have a local linux machine in which the files are dumped by a remote ubuntu server. If the process in remote server has any problem then empty files are created in local machine. Is there any way using perl script to check if the empty files are being created and delete them and then run a shell... (2 Replies)
Discussion started by: hussa1n
2 Replies
7. Shell Programming and Scripting
Hi,
I have a directory structure like the one given below
root\a\b1
root\a\b2
root\b\b1
root\b\b2
.
.
.
root\j\b1
root\j\b2
Now, there are a txt files in each dir and subdir, there is a root.txt
I have to write a script where in i have to run a command called "genrb <filename>"... (6 Replies)
Discussion started by: vikramsinghnegi
6 Replies
8. Shell Programming and Scripting
Question for anyone that might be able to help:
My objective is to eheck if a file (a source file) exists in a directory. If it does then, I'd like to call an application (Informatica ETL file...not necessary to know) to run a program which extracts data and loads it into multiple targets.
... (6 Replies)
Discussion started by: jnanasakti
6 Replies
9. Shell Programming and Scripting
Hi,
i have a script 'a.sh' that should be called only by certain scripts like b.sh, c.sh
Inside a.sh, how can i determine
1) if this script was run directly from command prompt (or scheduler)
2) if called via other scripts?
Is there an easy way to get parent process name (not just pid),... (2 Replies)
Discussion started by: ysrinu
2 Replies
10. Shell Programming and Scripting
I want to create an automated script which is called by another maually executed script.
The condition is that the no one should be able to manually execute the automated script.
The automated script can be on the same machine or it can be on a remote machine.
Can any one suggest a check in the... (1 Reply)
Discussion started by: adi_bang76
1 Replies
SET_TIME_LIMIT(3) 1 SET_TIME_LIMIT(3)
set_time_limit - Limits the maximum execution time
SYNOPSIS
bool set_time_limit (int $seconds)
DESCRIPTION
Set the number of seconds a script is allowed to run. If this is reached, the script returns a fatal error. The default limit is 30 sec-
onds or, if it exists, the max_execution_time value defined in the php.ini.
When called, set_time_limit(3) restarts the timeout counter from zero. In other words, if the timeout is the default 30 seconds, and 25
seconds into script execution a call such as set_time_limit(20) is made, the script will run for a total of 45 seconds before timing out.
PARAMETERS
o $seconds
- The maximum execution time, in seconds. If set to zero, no time limit is imposed.
RETURN VALUES
Returns TRUE on success, or FALSE on failure.
NOTES
Warning
This function has no effect when PHP is running in safe mode. There is no workaround other than turning off safe mode or changing
the time limit in the php.ini.
Note
The set_time_limit(3) function and the configuration directive max_execution_time only affect the execution time of the script
itself. Any time spent on activity that happens outside the execution of the script such as system calls using system(3), stream
operations, database queries, etc. is not included when determining the maximum time that the script has been running. This is not
true on Windows where the measured time is real.
SEE ALSO
max_execution_time, max_input_time.
PHP Documentation Group SET_TIME_LIMIT(3)