I was missing a step to get it to recalculate NF. Fixing the line you quoted:
combines adjacent partial lines and recalculates the number of fields on the newly combined line, and then the next line in the script:
prints the reconstructed partial lines (as well as printing any lines that were complete to start with.
This updated script:
when given the feedfile.txt that you uploaded, saves the following in fixed_feedfile.txt:
which I would think would be more useful than stripping out the 3 lines that were reconstructed from the partial lines in your input file and producing a single, concatenated, partial line containing 49 (not 51) fields (with no trailing <newline> character).
The space shown in the middle of the text shown in red above is because there is a space before the carriage return character in the 7th line in feedfile.txt which can be seen in the output from the cat -vet feedfile.txt you showed us in post #5 in this thread.
Hi,
I need to develop a script to join multiple three lines in a log file into one line for processing with awk and grep. I looked at tr with no success. The first line contains the date time information. The second line contains the error line. The third line is a blank line.
Thanks,
Mike (3 Replies)
Hi guys,
I've got a log file which has entries that look like this:
-------------------------------------------------------------------------------
06/08/04 07:57:57
AMQ9002: Channel program started.
EXPLANATION:
Channel program 'INSCCPQ1.HSMTSPQ1' started.
ACTION:
None. ... (3 Replies)
Hi,
I have two text files, that need their data joining/concatenation. 'Paste' works for this.
But have an issue when there is mismatch in number of rows in each file.
E.g.
(main file) File1 - has 20 rows
File2 - has 30 rows.
Command 'paste file1 file2 > file3' joins all lines.
I want the... (4 Replies)
I’m writing a bash shell script and I want to join lines together where two variables on each line are the same ie.
12345variablestuff43212morevariablestuff
12345variablestuff43212morevariablestuff
34657variablestuff78945morevariablestuff
34657variablestuff78945morevariablestuff... (12 Replies)
here is the part of the code
var1="replicate-ignore-db"
var2="replicate-same-server-id"
var3="skip-slave-start"
var4="report-host"
var5="master-host"
var6="master-user"
var7="master-password"
var8="master-port"
#code below deleted paramters as above if exists in my.cnf
for i in 1 2 3 4... (4 Replies)
I've been attempting to use curl and sed to allow for downloading a file from a dynamically generated URL. I've been able to retrieve and save the HTML of the page that does the dynamic generation of the download URL using curl but I'm very new to sed and I seem to be stuck at this part.
HTML: ... (1 Reply)
I need to copy the log file dynamically and that should run in loop , which means it should pick what ever the latest file is updated in that directory.
I am able to display the list and copy to directly but i have no idea on how to pick the dynamically updated files.
when i use this code, i... (1 Reply)
I'm looking for a way to join lines in a file; e.,g consider the following
R|This is line 1
R|This is
line 2
R|This is line 3
R|This is line 4
R|This is
line 5
what i want to end up with is
R|This is line 1
R|This is line 2
R|This is line 3
R|This is line 4
R|This is line 5
so... (15 Replies)
Hi,
I have the following reports that get generated every 1 hour and this is my requirement:
1. 5 reports get generated every hour with the names "Report.Dddmmyy.Thhmiss.CTLR"
"Report.Dddmmyy.Thhmiss.ACCD"
"Report.Dddmmyy.Thhmiss.BCCD"
"Report.Dddmmyy.Thhmiss.CCCD"... (1 Reply)
Since my last threads were closed on account of spamming, keeping just this one opened!
Hi,
I have the following reports that get generated every 1 hour and this is my requirement:
1. 5 reports get generated every hour with the names
"Report.Dddmmyy.Thhmiss.CTLR"... (5 Replies)
Discussion started by: Jesshelle David
5 Replies
LEARN ABOUT CENTOS
datetime::locale::kpe
DateTime::Locale::kpe(3) User Contributed Perl Documentation DateTime::Locale::kpe(3)NAME
DateTime::Locale::kpe
SYNOPSIS
use DateTime;
my $dt = DateTime->now( locale => 'kpe' );
print $dt->month_name();
DESCRIPTION
This is the DateTime locale package for Kpelle.
DATA
This locale inherits from the DateTime::Locale::root locale.
It contains the following data.
Days
Wide (format)
2
3
4
5
6
7
1
Abbreviated (format)
2
3
4
5
6
7
1
Narrow (format)
2
3
4
5
6
7
1
Wide (stand-alone)
2
3
4
5
6
7
1
Abbreviated (stand-alone)
2
3
4
5
6
7
1
Narrow (stand-alone)
2
3
4
5
6
7
1
Months
Wide (format)
1
2
3
4
5
6
7
8
9
10
11
12
Abbreviated (format)
1
2
3
4
5
6
7
8
9
10
11
12
Narrow (format)
1
2
3
4
5
6
7
8
9
10
11
12
Wide (stand-alone)
1
2
3
4
5
6
7
8
9
10
11
12
Abbreviated (stand-alone)
1
2
3
4
5
6
7
8
9
10
11
12
Narrow (stand-alone)
1
2
3
4
5
6
7
8
9
10
11
12
Quarters
Wide (format)
Q1
Q2
Q3
Q4
Abbreviated (format)
Q1
Q2
Q3
Q4
Narrow (format)
1
2
3
4
Wide (stand-alone)
Q1
Q2
Q3
Q4
Abbreviated (stand-alone)
Q1
Q2
Q3
Q4
Narrow (stand-alone)
1
2
3
4
Eras
Wide
BCE
CE
Abbreviated
BCE
CE
Narrow
BCE
CE
Date Formats
Full
2008-02-05T18:30:30 = 3, 2008 2 05
1995-12-22T09:05:02 = 6, 1995 12 22
-0010-09-15T04:44:23 = 7, -10 9 15
Long
2008-02-05T18:30:30 = 2008 2 5
1995-12-22T09:05:02 = 1995 12 22
-0010-09-15T04:44:23 = -10 9 15
Medium
2008-02-05T18:30:30 = 2008 2 5
1995-12-22T09:05:02 = 1995 12 22
-0010-09-15T04:44:23 = -10 9 15
Short
2008-02-05T18:30:30 = 08/02/05
1995-12-22T09:05:02 = 95/12/22
-0010-09-15T04:44:23 = -10/09/15
Default
2008-02-05T18:30:30 = 2008 2 5
1995-12-22T09:05:02 = 1995 12 22
-0010-09-15T04:44:23 = -10 9 15
Time Formats
Full
2008-02-05T18:30:30 = 18:30:30 UTC
1995-12-22T09:05:02 = 09:05:02 UTC
-0010-09-15T04:44:23 = 04:44:23 UTC
Long
2008-02-05T18:30:30 = 18:30:30 UTC
1995-12-22T09:05:02 = 09:05:02 UTC
-0010-09-15T04:44:23 = 04:44:23 UTC
Medium
2008-02-05T18:30:30 = 18:30:30
1995-12-22T09:05:02 = 09:05:02
-0010-09-15T04:44:23 = 04:44:23
Short
2008-02-05T18:30:30 = 18:30
1995-12-22T09:05:02 = 09:05
-0010-09-15T04:44:23 = 04:44
Default
2008-02-05T18:30:30 = 18:30:30
1995-12-22T09:05:02 = 09:05:02
-0010-09-15T04:44:23 = 04:44:23
Datetime Formats
Full
2008-02-05T18:30:30 = 3, 2008 2 05 18:30:30 UTC
1995-12-22T09:05:02 = 6, 1995 12 22 09:05:02 UTC
-0010-09-15T04:44:23 = 7, -10 9 15 04:44:23 UTC
Long
2008-02-05T18:30:30 = 2008 2 5 18:30:30 UTC
1995-12-22T09:05:02 = 1995 12 22 09:05:02 UTC
-0010-09-15T04:44:23 = -10 9 15 04:44:23 UTC
Medium
2008-02-05T18:30:30 = 2008 2 5 18:30:30
1995-12-22T09:05:02 = 1995 12 22 09:05:02
-0010-09-15T04:44:23 = -10 9 15 04:44:23
Short
2008-02-05T18:30:30 = 08/02/05 18:30
1995-12-22T09:05:02 = 95/12/22 09:05
-0010-09-15T04:44:23 = -10/09/15 04:44
Default
2008-02-05T18:30:30 = 2008 2 5 18:30:30
1995-12-22T09:05:02 = 1995 12 22 09:05:02
-0010-09-15T04:44:23 = -10 9 15 04:44:23
Available Formats
d (d)
2008-02-05T18:30:30 = 5
1995-12-22T09:05:02 = 22
-0010-09-15T04:44:23 = 15
EEEd (d EEE)
2008-02-05T18:30:30 = 5 3
1995-12-22T09:05:02 = 22 6
-0010-09-15T04:44:23 = 15 7
Hm (H:mm)
2008-02-05T18:30:30 = 18:30
1995-12-22T09:05:02 = 9:05
-0010-09-15T04:44:23 = 4:44
hm (h:mm a)
2008-02-05T18:30:30 = 6:30 PM
1995-12-22T09:05:02 = 9:05 AM
-0010-09-15T04:44:23 = 4:44 AM
Hms (H:mm:ss)
2008-02-05T18:30:30 = 18:30:30
1995-12-22T09:05:02 = 9:05:02
-0010-09-15T04:44:23 = 4:44:23
hms (h:mm:ss a)
2008-02-05T18:30:30 = 6:30:30 PM
1995-12-22T09:05:02 = 9:05:02 AM
-0010-09-15T04:44:23 = 4:44:23 AM
M (L)
2008-02-05T18:30:30 = 2
1995-12-22T09:05:02 = 12
-0010-09-15T04:44:23 = 9
Md (M-d)
2008-02-05T18:30:30 = 2-5
1995-12-22T09:05:02 = 12-22
-0010-09-15T04:44:23 = 9-15
MEd (E, M-d)
2008-02-05T18:30:30 = 3, 2-5
1995-12-22T09:05:02 = 6, 12-22
-0010-09-15T04:44:23 = 7, 9-15
MMM (LLL)
2008-02-05T18:30:30 = 2
1995-12-22T09:05:02 = 12
-0010-09-15T04:44:23 = 9
MMMd (MMM d)
2008-02-05T18:30:30 = 2 5
1995-12-22T09:05:02 = 12 22
-0010-09-15T04:44:23 = 9 15
MMMEd (E MMM d)
2008-02-05T18:30:30 = 3 2 5
1995-12-22T09:05:02 = 6 12 22
-0010-09-15T04:44:23 = 7 9 15
MMMMd (MMMM d)
2008-02-05T18:30:30 = 2 5
1995-12-22T09:05:02 = 12 22
-0010-09-15T04:44:23 = 9 15
MMMMEd (E MMMM d)
2008-02-05T18:30:30 = 3 2 5
1995-12-22T09:05:02 = 6 12 22
-0010-09-15T04:44:23 = 7 9 15
ms (mm:ss)
2008-02-05T18:30:30 = 30:30
1995-12-22T09:05:02 = 05:02
-0010-09-15T04:44:23 = 44:23
y (y)
2008-02-05T18:30:30 = 2008
1995-12-22T09:05:02 = 1995
-0010-09-15T04:44:23 = -10
yM (y-M)
2008-02-05T18:30:30 = 2008-2
1995-12-22T09:05:02 = 1995-12
-0010-09-15T04:44:23 = -10-9
yMEd (EEE, y-M-d)
2008-02-05T18:30:30 = 3, 2008-2-5
1995-12-22T09:05:02 = 6, 1995-12-22
-0010-09-15T04:44:23 = 7, -10-9-15
yMMM (y MMM)
2008-02-05T18:30:30 = 2008 2
1995-12-22T09:05:02 = 1995 12
-0010-09-15T04:44:23 = -10 9
yMMMEd (EEE, y MMM d)
2008-02-05T18:30:30 = 3, 2008 2 5
1995-12-22T09:05:02 = 6, 1995 12 22
-0010-09-15T04:44:23 = 7, -10 9 15
yMMMM (y MMMM)
2008-02-05T18:30:30 = 2008 2
1995-12-22T09:05:02 = 1995 12
-0010-09-15T04:44:23 = -10 9
yQ (y Q)
2008-02-05T18:30:30 = 2008 1
1995-12-22T09:05:02 = 1995 4
-0010-09-15T04:44:23 = -10 3
yQQQ (y QQQ)
2008-02-05T18:30:30 = 2008 Q1
1995-12-22T09:05:02 = 1995 Q4
-0010-09-15T04:44:23 = -10 Q3
yyQ (Q yy)
2008-02-05T18:30:30 = 1 08
1995-12-22T09:05:02 = 4 95
-0010-09-15T04:44:23 = 3 -10
Miscellaneous
Prefers 24 hour time?
Yes
Local first day of the week
2
SUPPORT
See DateTime::Locale.
AUTHOR
Dave Rolsky <autarch@urth.org>
COPYRIGHT
Copyright (c) 2008 David Rolsky. All rights reserved. This program is free software; you can redistribute it and/or modify it under the
same terms as Perl itself.
This module was generated from data provided by the CLDR project, see the LICENSE.cldr in this distribution for details on the CLDR data's
license.
perl v5.16.3 2014-06-10 DateTime::Locale::kpe(3)