Sample input (line feed indicated by )
---------------
The red fox jumped
over the brown fence of the
red hous
He then went into the
orchard
---------------
Desired Output
---------------
The red fox jumped over the brown fence of the red house
He then went into the orchard (11 Replies)
THIS is the output i Get i want to take out most of the banner and such and leave ------ down to ------ with fields right it doesnt seem to ouput right im not sure how to delete the $ characters because shell sees them .....
thansk
or even something that make it looks better to understand... (2 Replies)
Hello,
I'm trying to figure out how to use sed or awk to delete single lines in a file. By single, I mean lines that are not touching any other lines (just one line with white space above and below).
Example:
one
two
three
four
five
six
seven
eight
I want it to look like: (6 Replies)
Sample file:
This is line one,
this is another line,
this is the PRIMARY INDEX line
l ;
This is another line
The command should find the line with “PRIMARY INDEX” and remove the last character from the line preceding it (in this case , comma) and remove the first character from the line... (5 Replies)
Hi friends,
This is sed & awk type question.
I have a text file which has numbers spread all over the file. I want to sum the series of numbers whenever i find it and produce an output file with the sum. For example
###start of input text file ####
abc
def
ghi
1
2
3
4
kjld
random... (3 Replies)
Hi guys!
I use AWK commands under GAMS to predispose the data files to be read by GAMS.
I have a file which contains groups of data I need. Unfortunately I have the data spread in 3 rows for each subject.
Here's an example (the file is really long)
1 0 2.0956 100.00 250.00 100.00 2.0956... (4 Replies)
Dear Unix Forums,
I am hoping you can help me with a pattern matching problem.
What am I trying to do?
I want to replace multiple lines of a text file (that match a multi-line pattern) with a single line of text. These patterns can span several lines and do not always have the same number of... (10 Replies)
I have an awk statement in a ksh script that looks for a certain string then looks at each line after to find another match. The match could be the next line or second down and it works well.
nawk 'BEGIN {FS=RS;RS="!"} /interface loopback0/
{for(i=1;i<=NF; i++) if ($i ~ /ip... (5 Replies)
Hi,
I have been stuck in this requirement where my file contains the below format.
20150812170500846959990854-25383-8.0.0
"ABC Report" hp96880
"4952"
20150812170501846959990854-25383-8.0.0 End of run
20150812060132846959990854-20495-8.0.0
"XYZ Report" vg76452
"1006962188"... (6 Replies)
In the awk piped to sed below I am trying to format file by removing the odd xxxx_digits and whitespace after, then move the even xxxx_digit to the line above it and add a space between them. There may be multiple lines in file but they are in the same format. The Filename_ID line is the last line... (4 Replies)
Perl::Critic::Policy::Miscellanea::ProhibitUnrestrictedNUsertContributed Perl DoPerl::Critic::Policy::Miscellanea::ProhibitUnrestrictedNoCritic(3)NAME
Perl::Critic::Policy::Miscellanea::ProhibitUnrestrictedNoCritic - Forbid a bare "## no critic"
AFFILIATION
This Policy is part of the core Perl::Critic distribution.
DESCRIPTION
A bare "## no critic" annotation will disable all the active Policies. This creates holes for other, unintended violations to appear in
your code. It is better to disable only the particular Policies that you need to get around. By putting Policy names in a comma-separated
list after the "## no critic" annotation, then it will only disable the named Policies. Policy names are matched as regular expressions,
so you can use shortened Policy names, or patterns that match several Policies. This Policy generates a violation any time that an
unrestricted "## no critic" annotation appears.
## no critic # not ok
## no critic '' # not ok
## no critic () # not ok
## no critic qw() # not ok
## no critic (Policy1, Policy2) # ok
## no critic (Policy1 Policy2) # ok (can use spaces to separate)
## no critic qw(Policy1 Policy2) # ok (the preferred style)
NOTE
Unfortunately, Perl::Critic is very sloppy about parsing the Policy names that appear after a "##no critic" annotation. For example, you
might be using one of these broken syntaxes...
## no critic Policy1 Policy2
## no critic 'Policy1, Policy2'
## no critic "Policy1, Policy2"
## no critic "Policy1", "Policy2"
In all of these cases, Perl::Critic will silently disable all Policies, rather than just the ones you requested. But if you use the
"ProhibitUnrestrictedNoCritic" Policy, all of these will generate violations. That way, you can track them down and correct them to use
the correct syntax, as shown above in the "DESCRIPTION". If you've been using the syntax that is shown throughout the Perl::Critic
documentation for the last few years, then you should be fine.
CONFIGURATION
This Policy is not configurable except for the standard options.
AUTHOR
Jeffrey Ryan Thalhammer <jeff@imaginative-software.com>
COPYRIGHT
Copyright (c) 2008-2011 Imaginative Software Systems. All rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The full text of this license
can be found in the LICENSE file included with this module.
perl v5.16.3 2014-06-09 Perl::Critic::Policy::Miscellanea::ProhibitUnrestrictedNoCritic(3)