11-01-2003
You might want to use the cut command.
Last edited by Simerian; 11-01-2003 at 01:06 PM..
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I get the perl date in the following format:
Mon Jan 31 06:01:37 2005
How can I extract each field in a single line using a regular expression??
I dont want to use "split".
Any other way out??
JP :) (2 Replies)
Discussion started by: jyotipg
2 Replies
2. Shell Programming and Scripting
we are ftping zipped up files from the development server to the production server daily.The files are in this format filename.dat.20061231.12131.gz
I have to unzip the file (i can do that with gunzip) and then strip out the timestamp after the .dat extension.
I can do something like this
... (4 Replies)
Discussion started by: mervin2006
4 Replies
3. Shell Programming and Scripting
I have a variable that has an absolute path for a file on my computer. This dynamically changes. Is there a way I can assign two new variables from that one?
variable: /Users/keith/Desktop/test/file.mov
1) filename - no path or extention ....so just....file
2) path no filename or... (3 Replies)
Discussion started by: mainegate
3 Replies
4. UNIX for Dummies Questions & Answers
Hello, I am the CEO of Grand Tech Corporation. We are launching Linux NT and forgive me, but I do not know how to strip binaries down in Mandriva Linux. Can someone tell me a way to?:b: (2 Replies)
Discussion started by: Linux NT
2 Replies
5. Shell Programming and Scripting
Hi,
I have a scenario like, I need to replace a hyphens(-) for date field alone in the file.
I have minus(-) sign for other fields it should remain as such, only for date fields hyphens must be removed. Please find the content for the file below:
sample.txt:
-----------... (4 Replies)
Discussion started by: G.K.K
4 Replies
6. Shell Programming and Scripting
Hi Forum.
I searched the forum for a solution but could not find an exact one to my problem.
I have some records in the file where I would like to convert the last date field to another format while preserving the rest of the other fields.
For example:
Found:... (6 Replies)
Discussion started by: pchang
6 Replies
7. UNIX for Advanced & Expert Users
Hi colleagues,
I have this output, i need sort for 7th and 8th columns, the column 7th is date mm/dd/yyyy format and column 8th is time hh:mm:ss.number
PRUEBA 1263 0007 1 0 7131292 03/25/2013 16:43:04.159976 PROCESS
PRUEBA1 666 0146 1 0 11600064 ... (1 Reply)
Discussion started by: systemoper
1 Replies
8. UNIX for Dummies Questions & Answers
Hi all,
I have a file with a list of rpm's that have different dates. I am trying to just grab the latest rpm and install date, and discard the rest. The file has 1000's of entries all with different names and dates.
I have tried sort -k on the file and I am not grabbing the info,
... (4 Replies)
Discussion started by: gartie
4 Replies
9. Shell Programming and Scripting
Hi All ,
I am trying to find some non empty files from a directory based on below conditions :
Files::
SIZE DATE FILE
3679 Jan 25 23:59 belk_rpo_error_po9324892_01252014.log
0 Jul 01 06:30 belk_rpo_error_po9324267_07012014.log
0 Jul 20 05:50... (7 Replies)
Discussion started by: LoneRanger
7 Replies
10. UNIX for Dummies Questions & Answers
It is on the HP-Unix
Output desired:
Folder Name Date
Folder1 Mar 18 10:00
Folder2 Mar 17 12:23
Tried with
ls -ldt wp411* | awk '{print $9,"\t",$6," ",$7," "$8}'
Please help me with the headings (3 Replies)
Discussion started by: Siva SQL
3 Replies
LEARN ABOUT PHP
date_parse_from_format
DATE_PARSE_FROM_FORMAT(3) 1 DATE_PARSE_FROM_FORMAT(3)
date_parse_from_format - Get info about given date formatted according to the specified format
SYNOPSIS
array date_parse_from_format (string $format, string $date)
DESCRIPTION
Returns associative array with detailed info about given date.
PARAMETERS
o $format
- Format accepted by DateTime.createFromFormat(3).
o $date
- String representing the date.
RETURN VALUES
Returns associative array with detailed info about given date.
EXAMPLES
Example #1
date_parse_from_format(3) example
<?php
$date = "6.1.2009 13:00+01:00";
print_r(date_parse_from_format("j.n.Y H:iP", $date));
?>
The above example will output:
Array
(
[year] => 2009
[month] => 1
[day] => 6
[hour] => 13
[minute] => 0
[second] => 0
[fraction] =>
[warning_count] => 0
[warnings] => Array
(
)
[error_count] => 0
[errors] => Array
(
)
[is_localtime] => 1
[zone_type] => 1
[zone] => -60
[is_dst] =>
)
SEE ALSO
DateTime.createFromFormat(3), checkdate(3).
PHP Documentation Group DATE_PARSE_FROM_FORMAT(3)