Hi
I have the following requirement. i have the following line from a log file
one : two : Three : four : five : six : seven : eight :nine :ten
Now can you pls help what i should do to get only the following output from the above line
two : five : six : seven : Eight
appreciate your... (3 Replies)
Hi all,
I need to extract lines between the lines 'RD' and 'QA' from a text file (following). there are more that one of such pattern in the file and I need to extract all of them. however, the number of lines between them is varied in the file. Therefore, I can not just use 'grep -A' command.... (6 Replies)
I want to search files (basically .cc files) in /xx folder and subfolders.
Those files (*.cc files) must contain #include "header.h" AND x() function.
I am writing it another way to make it clear,
I wanna list of *.cc files that have 'header.h' & 'x()'. They must have two strings, header.h... (2 Replies)
Hello everyone,
ive been trying to replace a string "kw01" in an xml file with the contents of a txt file having multiple lines. im a unix newbie and all the sed combinations i tried resulted to being garbled. Below is the contents of the txt file:
RAISEDATTIME
--------------------... (13 Replies)
Hi all,
Please go through my requirement.
I have a log file in the location /opt/WebSphere61/AppServer/profiles/EMQbatchprofile/logs/EMQbatch
This file contains the follwing pattern data
<af type="tenured" id="42" timestamp="May 14 13:44:13 2011" intervalms="955.624">
<minimum... (8 Replies)
I am trying to extract multiple strings from snmp-mib files like below.
-----
$ cat IF-MIB.mib
<snip>
linkDown NOTIFICATION-TYPE
OBJECTS { ifIndex, ifAdminStatus, ifOperStatus }
STATUS current
DESCRIPTION
"A linkDown trap signifies that the SNMP entity, acting in... (5 Replies)
I have a file that has some lines starts with *
I want to get these lines, then get the word between "diac" and "lex".
ex.
file:
;;WORD AlAx
*0.942490 diac:Al>ax lex:>ax_1 bw:Al/DET+>ax/NOUN+ gloss:brother pos:noun prc3:0 prc2:0 prc1:0 prc0:Al_det per:na asp:na vox:na mod:na gen:m num:s... (4 Replies)
Hi
I have a txt file and I would like to use egrep without using -v option to exclude the lines which matches with multiple Strings.
Let's say I have some text in the txt file. The command should not fetch lines if they have strings something like
CAT MAT DAT
The command should fetch me... (4 Replies)
Hello,
I have spent considerable amount of time breaking my head on this and reached out here. here is the back ground.
OS - Solaris 10
There are two strings '<Orin>sop' and '<Dup>two' which I wanted to look for in a file without the quotes on different lines and ONLY if both strings are... (5 Replies)
Hello
I have an output that has a string between quotes and another between square brackets on the same line. I need to extract these 2 strings Example line
Device "nrst3a" attributes=(0x4) RAW SERIAL_NUMBER=SNL2
Output should look like
nrst3a VD073AV1443BVW00083
I was trying with sed... (3 Replies)
Discussion started by: bombcan
3 Replies
LEARN ABOUT PHP
date_sunrise
DATE_SUNRISE(3) 1 DATE_SUNRISE(3)date_sunrise - Returns time of sunrise for a given day and locationSYNOPSIS
mixed date_sunrise (int $timestamp, [int $format = SUNFUNCS_RET_STRING], [float $latitude = ini_get("date.default_latitude")], [float
$longitude = ini_get("date.default_longitude")], [float $zenith = ini_get("date.sunrise_zenith")], [float $gmt_offset])
DESCRIPTION date_sunrise(3) returns the sunrise time for a given day (specified as a $timestamp) and location.
PARAMETERS
o $timestamp
- The $timestamp of the day from which the sunrise time is taken.
o $format
-
$format constants
+-----------------------+-------------------------------------------+
| constant | |
| | |
| | description |
| | |
| | example |
| | |
+-----------------------+-------------------------------------------+
| SUNFUNCS_RET_STRING | |
| | |
| | returns the result as string |
| | |
| | 16:46 |
| | |
| SUNFUNCS_RET_DOUBLE | |
| | |
| | returns the result as float |
| | |
| | 16.78243132 |
| | |
|SUNFUNCS_RET_TIMESTAMP | |
| | |
| | returns the result as integer (timestamp) |
| | |
| | 1095034606 |
| | |
+-----------------------+-------------------------------------------+
o $latitude
- Defaults to North, pass in a negative value for South. See also: date.default_latitude
o $longitude
- Defaults to East, pass in a negative value for West. See also: date.default_longitude
o $zenith
- Default: date.sunrise_zenith
o $gmtoffset
- Specified in hours.
RETURN VALUES
Returns the sunrise time in a specified $format on success or FALSE on failure.
ERRORS /EXCEPTIONS
Every call to a date/time function will generate a E_NOTICE if the time zone is not valid, and/or a E_STRICT or E_WARNING message if using
the system settings or the $TZ environment variable. See also date_default_timezone_set(3)CHANGELOG
+--------+---------------------------------------------------+
|Version | |
| | |
| | Description |
| | |
+--------+---------------------------------------------------+
| 5.1.0 | |
| | |
| | Now issues the E_STRICT and E_NOTICE time zone |
| | errors. |
| | |
+--------+---------------------------------------------------+
EXAMPLES
Example #1
date_sunrise(3) example
<?php
/* calculate the sunrise time for Lisbon, Portugal
Latitude: 38.4 North
Longitude: 9 West
Zenith ~= 90
offset: +1 GMT
*/
echo date("D M d Y"). ', sunrise time : ' .date_sunrise(time(), SUNFUNCS_RET_STRING, 38.4, -9, 90, 1);
?>
The above example will output something similar to:
Mon Dec 20 2004, sunrise time : 08:54
SEE ALSO date_sunset(3).
PHP Documentation Group DATE_SUNRISE(3)