Sponsored Content
Full Discussion: File name with yyyymmddhhmi
Top Forums UNIX for Beginners Questions & Answers File name with yyyymmddhhmi Post 303019971 by wbport on Wednesday 11th of July 2018 10:33:42 AM
Old 07-11-2018
If it will be in a script perhaps
Code:
datetime=`date +%Y%m%d%H%M`
date >myFile.$datetime.csv

 

3 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Match list of strings in File A and compare with File B, C and write to a output file in CSV format

Hi Friends, I'm a great fan of this forum... it has helped me tone my skills in shell scripting. I have a challenge here, which I'm sure you guys would help me in achieving... File A has a list of job ids and I need to compare this with the File B (*.log) and File C (extend *.log) and copy... (6 Replies)
Discussion started by: asnandhakumar
6 Replies

2. Shell Programming and Scripting

Compare 2 text file with 1 column in each file and write mismatch data to 3rd file

Hi, I need to compare 2 text files with around 60000 rows and 1 column. I need to compare these and write the mismatch data to 3rd file. File1 - file2 = file3 wc -l file1.txt 58112 wc -l file2.txt 55260 head -5 file1.txt 101214200123 101214700300 101250030067 101214100500... (10 Replies)
Discussion started by: Divya Nochiyil
10 Replies

3. Shell Programming and Scripting

Shell script (sh file) logic to compare contents of one file with another file and output to file

Shell script logic Hi I have 2 input files like with file 1 content as (file1) "BRGTEST-242" a.txt "BRGTEST-240" a.txt "BRGTEST-219" e.txt File 2 contents as fle(2) "BRGTEST-244" a.txt "BRGTEST-244" b.txt "BRGTEST-231" c.txt "BRGTEST-231" d.txt "BRGTEST-221" e.txt I want to get... (22 Replies)
Discussion started by: pottic
22 Replies
Atompub::DateTime(3pm)					User Contributed Perl Documentation				    Atompub::DateTime(3pm)

NAME
Atompub::DateTime - A date and time object for the Atom Publishing Protocol SYNOPSIS
# assuming the local timezone is JST (+09:00) use Atompub::DateTime qw(datetime); $dt = datetime; # current time $dt = datetime(DateTime->new); $dt = datetime(1167609600); # UTC epoch value $dt = datetime('20070101090000'); $dt = datetime('2007-01-01 09:00:00'); $dt = datetime('2007-01-01 00:00:00Z'); $dt = datetime('2007-01-01T09:00:00+09:00'); $dt = datetime('2007-01-01T00:00:00Z'); $dt = datetime('Mon, 01 Jan 2007 00:00:00 GMT'); $dt->epoch; # 1167609600 (UTC epoch value) $dt->iso; # 2007-01-01 09:00:00 (in localtime) $dt->isoz; # 2007-01-01 00:00:00Z $dt->w3c; # 2007-01-01T09:00:00+09:00 $dt->w3cz; # 2007-01-01T00:00:00Z $dt->str; # Mon, 01 Jan 2007 00:00:00 GMT my $dt2 = datetime($dt); # copy $dt == $dt2; # compare "$dt"; # $dt->w3c $dt->dt; # DateTime object METHODS
Atompub::DateTime->new([ $str ]) Returns a datetime object representing the time $str. If the function is called without an argument, it will use the current time. datetime([ $str ]) An alias for Atompub::DateTime->new $datetime->epoch Returns UTC epoch value. 1167609600 $datetime->iso Returns a "YYYY-MM-DD hh:mm:ss"-formatted string representing time in the local time zone. 2007-01-01 09:00:00 $datetime->isoz Returns a "YYYY-MM-DD hh:mm:ssZ"-formatted string representing Universal Time. 2007-01-01 00:00:00Z $datetime->w3c Returns a "YYYY-MM-DDThh:mm:ssTZ"-formatted string (W3C DateTime Format) representing time in the local time zone. 2007-01-01T09:00:00+09:00 $datetime->w3cz Returns a "YYYY-MM-DDThh:mm:ssZ"-formatted string (W3C DateTime Format) representing Universal Time. 2007-01-01T00:00:00Z $datetime->str Returns a human readable representation. Mon, 01 Jan 2007 00:00:00 GMT $datetime->dt An accessor for the internal DateTime object. $datetime->tz An accessor for the internal DateTime::TimeZone object. $datetime->fmt An accessor for the internal DateTime::Format object. INTERNAL INTERFACES
$datetime->init $datetime->_parse_timestamp SEE ALSO
Atompub AUTHOR
Takeru INOUE, <takeru.inoue _ gmail.com> LICENCE AND COPYRIGHT
Copyright (c) 2007, Takeru INOUE "<takeru.inoue _ gmail.com>". All rights reserved. This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic. DISCLAIMER OF WARRANTY
BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. perl v5.14.2 2011-04-30 Atompub::DateTime(3pm)
All times are GMT -4. The time now is 01:14 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy