bakunin,
Thanks again so much for taking young time to help me ( and all of the users here...).
It works like a charm now. Here my code :
I don't know why print does not work to output error, so I use echo ( does it matter ? )
And
---------- Post updated at 04:20 PM ---------- Previous update was at 04:16 PM ----------
Bakunin,
I learned so much thanks to you, I'll like to learn more about "modern shell".
Can you please point me to some clues where to start.
Thanks again
Thibault
Hi,
I'm trying to compare Actual.html with a baseline.html
However, everytime it fails b'coz of the timestamp differences
between the two. So, thought of stripping off the timestamp
from both the *html files before comparing using below sed
command over Solaris Unix platform:... (3 Replies)
I am using UNIX from few months, I want to delete files in subdirectories that have a timestamp till yesterday. I mean all the files before Jan 10th...
can I just give find and do it or how do I do it??? (2 Replies)
Hi all,
I have a binary file (orig.dat) and two special delimiter strings 'AAA' and 'BBB'. My binary file's content is as follow:
<Data1.1>AAA<Data1.2>BBB
<Data2.1>AAA<Data2.2>BBB
...
<DataN.1>AAA<DataN.2>BBB
DataX.Y might have any length, and contains any kind of special/printable... (1 Reply)
Hi folks,
Happy new year.
I have a file 'filename' that i wd like to split basing on the contents in the last column.
The 'filename' content looks like
256772744788,9,11
256772744805,9,11
256772744792,9,11
256775543055,10,12
256782625357,9,12
256772368953,10,13
256772627735,10,13... (3 Replies)
So, I know how to do some of this stuff on an individual level, but I'm drawing a blank as to how to put it all together.
I have a pattern that I'm looking for in a log file. The log file I know came in yesterday, so I want to limit the search to that day's listing of files. How would I do... (5 Replies)
Hi All,
I am new to unix programming. I am trying for a requirement and the requirement goes like this.....
I have a test folder. Which tracks log files. After certain time, the log file is getting overwritten by another file (randomly as the time interval is not periodic). I need to preserve... (2 Replies)
In folder there are files
(eg ABS_18APR2012_XYZ.csv
DSE_17APR2012_ABE.csv) .
My requirement is to delete all the files except today's timestamp
I tried doing this to list all the files not having today's date timestamp
#!/bin/ksh
DATE=`date +"%d%h%Y"`
DIR=/data/rfs/... (9 Replies)
Dear friends,
I have two files. One with all IDs(in a single field) . And another with data(of which say field 5 is ID). I want to create an array of IDs using first file and
while reading second file if the ID appears in the array I need to print $0 else skip.
After a long gap I am... (6 Replies)
Hi ,
I did the initial search but could not find what I was expecting for.
15606Always_9999999997_20160418.xml
15606Always_9999999998_20160418.xml
15606Always_9999999999_20160418.xml
9819Always_99999999900_20160418.xml
9819Always_99999999911_20160418.xmlAbove is the list of files I... (4 Replies)
Discussion started by: chillblue
4 Replies
LEARN ABOUT PHP
gmstrftime
GMSTRFTIME(3) 1 GMSTRFTIME(3)gmstrftime - Format a GMT/UTC time/date according to locale settings
SYNOPSIS
string gmstrftime (string $format, [int $timestamp = time()])
DESCRIPTION
Behaves the same as strftime(3) except that the time returned is Greenwich Mean Time (GMT). For example, when run in Eastern Standard Time
(GMT -0500), the first line below prints "Dec 31 1998 20:00:00", while the second prints "Jan 01 1999 01:00:00".
PARAMETERS
o $format
- See description in strftime(3).
o $timestamp
- The optional $timestamp parameter is an integer Unix timestamp that defaults to the current local time if a $timestamp is not
given. In other words, it defaults to the value of time(3).
RETURN VALUES
Returns a string formatted according to the given format string using the given $timestamp or the current local time if no timestamp is
given. Month and weekday names and other language dependent strings respect the current locale set with setlocale(3).
EXAMPLES
Example #1
gmstrftime(3) example
<?php
setlocale(LC_TIME, 'en_US');
echo strftime("%b %d %Y %H:%M:%S", mktime(20, 0, 0, 12, 31, 98)) . "
";
echo gmstrftime("%b %d %Y %H:%M:%S", mktime(20, 0, 0, 12, 31, 98)) . "
";
?>
SEE ALSO strftime(3).
PHP Documentation Group GMSTRFTIME(3)