03-03-2006
can you explain what problem you are getting. Be a bit elaborate
Gaurav
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I apologize for the simple question but can someone please help me with how to evaluate a number?
I will be reading in a file and if a number is >= 100000000, I will do something, if not, I will exit the if statement.
Thanks in advance (1 Reply)
Discussion started by: hedrict
1 Replies
2. UNIX for Advanced & Expert Users
Does anyone know any tools or how to really get something out of a core file.
I can use strings and look for certain things like out of memory.
I am trying to use adb but I can't make heads or tails from it. I guess it is my lack of know how with the adb/mdb debugger.
anything would... (3 Replies)
Discussion started by: Gary Dunn
3 Replies
3. UNIX for Dummies Questions & Answers
Hi
I have a script in which I have several variables
var1
var2
var3
var4
etc......
and
field1
field2
field3
field4
etc.......
The script similar to this: (6 Replies)
Discussion started by: Bab00shka
6 Replies
4. UNIX for Dummies Questions & Answers
Hi all,
I ve a script like....
TBL=employee
sql=`cat abhi.sql` \\ abhi.sql contains ------- select a from $TBL
echo $TBL
echo $sql
SQL=`echo $sql`
echo $SQL
now i want SQL as select a from employee
and as select a from $TBL
How can I achieve this?
Help appriciated (3 Replies)
Discussion started by: abzi
3 Replies
5. Shell Programming and Scripting
I have a user defined configuration file, which could contain the following type of entries:
directory_001=/a/directory/structure
pattern_001=fred*
pattern_002=*
I have a script which reads the file generically which will loop round
loop 1
genvar=”directory”
iteration=”001”
... (11 Replies)
Discussion started by: Bab00shka
11 Replies
6. Shell Programming and Scripting
Hi,
I have the following requirement.
V="First"
R="V"
echo $$R
The output should be First. How do i achieve this.
how do we evaluate the $R and evaluate it to $V as $R contains V
and $V is First.
Thanks
Vijay (2 Replies)
Discussion started by: vijaykrc
2 Replies
7. Shell Programming and Scripting
I have the following in my makefile:
RESULT=`../${TOOLS_ROOT_PATH}/ext_tools.sh 11`; \
set $$RESULT > tMp; \
rm tMp; \
if ; then \
echo copying external-local tool: $< \($$*\); \
mkdir -p ${EXTERNAL_LOCAL_BIN_DIR}/$<; \
cp -f... (4 Replies)
Discussion started by: jake_ryan
4 Replies
8. Shell Programming and Scripting
Does anyone know of a way to force a variable name held in another variable to return the value of the first variable? Best if I give an example, that does not work:
/usr/local/bin >cat mike.sh
NUM1ref=16
NUM2ref=32
echo "=============="
for VAR in NUM1 NUM2
do
XXXX=${VAR}ref
echo $XXXX... (4 Replies)
Discussion started by: mikejordan
4 Replies
9. UNIX for Dummies Questions & Answers
So, the beginning of my script will cat & grep a file with the output directed to a new file. The data I have in this file needs to be parsed, read and evaluated.
Basically, I need to identify the latest date/time stamp and then calculate whether or not it is within 15 minutes of the current... (1 Reply)
Discussion started by: hynesward
1 Replies
10. UNIX for Dummies Questions & Answers
Hi Guys,
Good day ULF :) I hope you can help me again with my problem. I have a file which looks like this:
Command was launched from partition 0.
------------------------------------------------
Executing command in server server3
Dec 18 21:31:12 AHM04 nseventmgr: EVENT-SET:... (4 Replies)
Discussion started by: rymnd_12345
4 Replies
LEARN ABOUT PHP
datetime.modify
DATETIME.MODIFY(3) 1 DATETIME.MODIFY(3)
DateTime::modify - Alters the timestamp
Object oriented style
SYNOPSIS
public DateTime DateTime::modify (string $modify)
DESCRIPTION
Procedural style
DateTime date_modify (DateTime $object, string $modify)
Alter the timestamp of a DateTime object by incrementing or decrementing in a format accepted by strtotime(3).
PARAMETERS
o $object
-Procedural style only: A DateTime object returned by date_create(3). The function modifies this object.
o $modify
-A date/time string. Valid formats are explained in Date and Time Formats.
RETURN VALUES
Returns the DateTime object for method chaining or FALSE on failure.
CHANGELOG
+--------+---------------------------------------------------+
|Version | |
| | |
| | Description |
| | |
+--------+---------------------------------------------------+
| 5.3.6 | |
| | |
| | Absolute date/time statements now take effect. |
| | Previously, only relative parts were used. |
| | |
| 5.3.0 | |
| | |
| | Changed the return value on success from NULL to |
| | DateTime. |
| | |
+--------+---------------------------------------------------+
EXAMPLES
Example #1
DateTime.modify(3) example
Object oriented style
<?php
$date = new DateTime('2006-12-12');
$date->modify('+1 day');
echo $date->format('Y-m-d');
?>
Procedural style
<?php
$date = date_create('2006-12-12');
date_modify($date, '+1 day');
echo date_format($date, 'Y-m-d');
?>
The above examples will output:
2006-12-13
Example #2
Beware when adding or subtracting months
<?php
$date = new DateTime('2000-12-31');
$date->modify('+1 month');
echo $date->format('Y-m-d') . "
";
$date->modify('+1 month');
echo $date->format('Y-m-d') . "
";
?>
The above example will output:
2001-01-31
2001-03-03
SEE ALSO
strtotime(3), DateTime.add(3), DateTime.sub(3), DateTime.setDate(3), DateTime.setISODate(3), DateTime.setTime(3), DateTime.setTimes-
tamp(3).
PHP Documentation Group DATETIME.MODIFY(3)