Hello I'm trying to write a shell script which can remove a carriage return and/or line feed from a file, so the resulting file all ends up on one line.
So, I begin with a file like this
text in file!<CR>
line two!<CR>
line three!<CR>
END!<CR>
And I want to end up with a file... (1 Reply)
Hi,
I have a situation where I need to remove the carriage return between the lines.
For.eg.
The input file:
1,ad,"adc
sdfd",edf
2,asd,"def
fde",asd
The output file should be
1,ad,adc sdfd,edf
2,asd,def fde,asd
Thanks
Shash (5 Replies)
I want to instert Category:XXXXX into the 2. line
something like this should work, but I have somewhere the wrong sytanx. something with the linebreak goes wrong:
sed "2i\\${n}Category:$cat\n"
Sample:
Titel Blahh Blahh abllk sdhsd sjdhf
Blahh Blah Blahh
Blahh
Should look like... (2 Replies)
I keep running into the same problem with the following script. Every time it prints the carrage (line feed) char when I test. I believe that the issue is in the group by but I do not see it. The code is as follows.
SET FEED OFF
SET ECHO OFF
SET HEADING OFF
SET LINESIZE 1000
SET PAGESIZE... (1 Reply)
Hi All,
I am reading two files and writing out the file name and count of lines in each file to an output file.
My script looks like this:
echo "input_file1.out;`wc -l < input_file1.out | sed 's/^]*\(.*\)]*$/\1/'` " > comp_file1.out
echo "input_file2.out;`wc -l < input_file2.out | sed... (2 Replies)
Hello!
I have one strange question - let's say I have a long, multiple-line string displayed on the terminal using echo, and I would like to make a carriage return to the beginning of this string, no to the beginning of the last line - is something like that possible? I would like to be able to... (1 Reply)
Hi experts,
Need your help on how to insert carriage return after the 10th char position of each line in a file and then add two blank spaces after the carriage return.
Example:
>cat test.txt
testingline
dummystring
samplesample
teststringline
Expected output should be..
... (2 Replies)
Hello,
Can someone please share a Simple AWK command to append Carriage Return & Line Feed to the end of the file, If the Carriage Return & Line Feed does not exist !
Thanks (16 Replies)
Perl::Critic::Policy::ValuesAndExpressions::ProhibitLongUsernContribPerl::Critic::Policy::ValuesAndExpressions::ProhibitLongChainsOfMethodCalls(3)NAME
Perl::Critic::Policy::ValuesAndExpressions::ProhibitLongChainsOfMethodCalls - Long chains of method calls indicate tightly coupled code.
AFFILIATION
This Policy is part of the core Perl::Critic distribution.
DESCRIPTION
A long chain of method calls usually indicates that the code knows too much about the interrelationships between objects. If the code is
able to directly navigate far down a network of objects, then when the network changes structure in the future, the code will need to be
modified to deal with the change. The code is too tightly coupled and is brittle.
$x = $y->a; #ok
$x = $y->a->b; #ok
$x = $y->a->b->c; #questionable, but allowed by default
$x = $y->a->b->c->d; #not ok
CONFIGURATION
This policy has one option: "max_chain_length" which controls how far the code is allowed to navigate. The default value is 3.
TO DO
Add a "class_method_exemptions" option to allow for things like
File::Find::Rule
->name('*.blah')
->not_name('thingy')
->readable()
->directory()
->in(@roots);
AUTHOR
Elliot Shank "<perl@galumph.com>"
COPYRIGHT
Copyright (c) 2007-2011 Elliot Shank.
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::ProhibitLongChainsOfMethodCalls(3)