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::ValuesAndExpressions::ProhibitSpecUserPerl::Critic::Policy::ValuesAndExpressions::ProhibitSpecialLiteralHeredocTerminator(3)NAME
Perl::Critic::Policy::ValuesAndExpressions::ProhibitSpecialLiteralHeredocTerminator - Don't write " print <<'__END__' ".
AFFILIATION
This Policy is part of the core Perl::Critic distribution.
DESCRIPTION
Using one of Perl's special literals as a HEREDOC terminator could be confusing to tools that try to parse perl.
print <<'__END__'; #not ok
Hello world
__END__
print <<'__END_OF_WORLD__'; #ok
Goodbye world!
__END_OF_WORLD__
The special literals that this policy prohibits are:
__END__
__DATA__
__PACKAGE__
__FILE__
__LINE__
CONFIGURATION
This Policy is not configurable except for the standard options.
SEE ALSO
Perl::Critic::Policy::ValuesAndExpressions::RequireUpperCaseHeredocTerminator
Perl::Critic::Policy::ValuesAndExpressions::RequireQuotedHeredocTerminator
AUTHOR
Kyle Hasselbacher <kyle@cpan.org>
COPYRIGHT
Copyright (c) 2009-2011 Kyle Hasselbacher.
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.3Perl::Critic::Policy::ValuesAndExpressions::ProhibitSpecialLiteralHeredocTerminator(3)