Can any one give me the idea on replacing multiple blank lines with a single blank line?
Please conside it for a file having more than 100 number of characters.
Regards,
Siba (3 Replies)
I have a H U G E file with over 1million entries in it.
Looks something like this:
USER0001|DEVICE001|VAR1
USER0001|DEVICE001|VAR2
USER0001|DEVICE001|VAR3
USER0001|DEVICE001|VAR4
USER0001|DEVICE001|VAR5
USER0001|DEVICE001|VAR6
USER0001|DEVICE002|VAR1
USER0001|DEVICE002|VAR2... (4 Replies)
Hi,
I've some files with the following data and i need to convert the lines between the separator ---, into a single line. I've tried with the paste cmd but my main problem is that the number of lines between the separator is not fix, it can very between 1-4 lines.
Input
---
2010-02-22... (4 Replies)
This is related to one of my previous post but now with a slight difference: I need the "Updated:" to be in one line as well as the "Information:" on one line as well. These are in multiple lines right now as seen below. These can have 2 or more lines that needs to be in one line.
System name:... (8 Replies)
Hi,
I have a requirement with,
No~Dt~Notes
1~2011/08/1~"aaa
bbb
ccc
ddd
eee
fff
ggg
hhh"
Single column alone got splitted into multiple lines.
I require the output as
No~Dt~Notes
1~2011/08/1~"aaa<>bbb<>ccc<>ddd<>eee<>fff<>ggg<>hhh"
mean to say those new lines to be... (1 Reply)
Hi All,
I have a spool file which as shown below. I want to make it as single line after every semicolon. In this case there should be 2 lines in vi editor.
I am not used to use sed so could you guys please help me out ?
exec spk_dba.sp_runsql('ALP','CREATE DATABASE LINK "TEST" CONNECT TO... (2 Replies)
Hi all,
I have a requirement to covert multiple lines in a comma delimited file to a single line through shell scripting. We should compare the data in the first column in each line. If it is same, then the other data should be put in the same line.Below is the sample input and expected output:... (4 Replies)
I Want to merge multiple lines based on the 1st field and keep into single record.
SRC File:
AAA_POC_DB.TAB1
AAA_POC_DB.TAB2
AAA_POC_DB.TAB3
AAA_POC_DB.TAB4
BBB_POC_DB.TAB1
BBB_POC_DB.TAB2
CCC_POC_DB.TAB6
OUTPUT
-----------------
'AAA_POC_DB','TAB1','TAB2','TAB3','TAB4'... (10 Replies)
I have code as below
# create temporary table `temp4277`(key(waybill_no))
select waybill_no,concat_ws('',card_type,card_series_no) cardinfo
from rfid_temp_ticket where waybill_no='4277'
group by... (4 Replies)
Discussion started by: kaushik02018
4 Replies
LEARN ABOUT DEBIAN
atompub::datetime
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)