Hi
i am having text file like this
40000201040005200213072009000000700000050744820906904421
40069300240005200713072009000000067400098543630000920442
i want to replace 9-16 positions of my txt file...by 1234567...in a single line command
i.e
0400052....should be replaced by... (2 Replies)
Hello ,
I need to extract data from specific byte positions of a file.
I have tried the below command
awk ' { printf "%s", substr($0, 642363,642369}' filename
to extract data between byte positions
642363 and 642369 .
However I did not get the expected result.
I am new to awk... (6 Replies)
I am attempting to replace positions 44-46 with YYY if positions 48-50 = XXX.
awk -F "" '{if (substr($0,48,3)=="XXX") $44="YYY"}1' OFS="" $filename > $tempfile
But this is not working, 44-46 is still spaces in my tempfile instead of YYY. Any suggestions would be greatly appreciated. (9 Replies)
I have a huge file with lot of rows... with each row around 400 characters.. with spaces as well..
(e.g)
Line1:
"AC254600606 USDMI000001Anom01130073981 0000000000000.002005040720991231 ... (13 Replies)
Been searching for about 3 hours for similar functionality that I can get examples of how to output text from variables into certain locations in a file. I would like to incorporate this into a script. I have not been able to find a command example that does it all in one method. I find part of... (1 Reply)
Hi all, I need help.
I have an input text file (input.txt) like this:
21 GTGCAACACCGTCTTGAGAGG 50
21 GACCGAGACAGAATGAAAATC 73
21 CGGGTCTGTAGTAGCAAACGC 108
21 CGAAAAATGAACCCCTTTATC 220
21 CGTGATCCTGTTGAAGGGTCG 259
Now I need to count A/T/G/C numbers at each character location in column... (2 Replies)
Hi, I am trying to use an awk command to replace specific character positions on a line beginning with 80 with contents of another file.
The line beginning with 80 in file1 is as follows:
I want to replace the 000000000178800 (positions 34 - 49) on this file with the contents of... (2 Replies)
Hi all, I have column 2 full of values like HIVE4A-56 and HIVE4-56. I want to convert all values like HIVE4A-56 to HIVE4-56.
So basically I want to delete all single alphabets before the '-' which is always preceded by a number. Values already in the desired format should remain unchanged... (4 Replies)
hi.
I have a Fixed Length text file as input where the character positions 4-5(two character positions starting from 4th position) indicates the LOB indicator. The file structure is something like below:
10126Apple DrinkOmaha
10231Milkshake New Jersey
103 Billabong Illinois
... (6 Replies)
Hi,
I have a file with hundreds of lines. I want to search for particular lines starting with 4000, search and replace the 137-139 position characters; which will be '000', with '036'. Can all of this be done without opening a temp file and then moving that temp file to the original file name.
... (7 Replies)
Discussion started by: dsid
7 Replies
LEARN ABOUT DEBIAN
authority::shared
authority::shared(3pm) User Contributed Perl Documentation authority::shared(3pm)NAME
authority::shared - a multi-AUTHORITY method for your classes
SYNOPSIS
package MyApp;
BEGIN { $MyApp::AUTHORITY = 'cpan:JOE'; }
use authority::shared qw(cpan:ALICE cpan:BOB);
package main;
use feature qw(say);
say scalar MyApp->AUTHORITY; # says "cpan:JOE"
MyApp->AUTHORITY('cpan:JOE'); # lives
MyApp->AUTHORITY('cpan:ALICE'); # lives
MyApp->AUTHORITY('cpan:BOB'); # lives
MyApp->AUTHORITY('cpan:CAROL'); # croaks
DESCRIPTION
This module allows you to indicate that your module is issued by multiple authorities. The package variable $AUTHORITY should still be used
to indicate the primary authority for the package.
This module does two simple things:
1. Creates an @AUTHORITIES array in the caller package, populating it with the arguments passed to "authority::shared" on the "use" line.
2. Exports an AUTHORITY function to your package that reads the $AUTHORITY and @AUTHORITIES package variables.
The main use case for shared authorities is for team projects. The team would designate a URI to represent the team as a whole. For
example, "http://datetime.perl.org/", "http://moose.iinteractive.com/" or "http://www.perlrdf.org/". Releases can then be officially
stamped with the authority of the team using:
use authority::shared q<http://www.perlrdf.org/>;
And users can check they have an module released by the official team using:
RDF::TakeOverTheWorld->AUTHORITY(q<http://www.perlrdf.org/>);
which will croak if package RDF::TakeOverTheWorld doesn't have the specified authority.
BUGS
An obvious limitation is that this module relies on honesty. Don't release modules under authorities you have no authority to use.
Please report any bugs to http://rt.cpan.org/Dist/Display.html?Queue=authority-shared
<http://rt.cpan.org/Dist/Display.html?Queue=authority-shared>.
SEE ALSO
o Object::AUTHORITY - an AUTHORITY method for your class
o authority::shared (this module) - a more sophisticated AUTHORITY method for your class
o UNIVERSAL::AUTHORITY - an AUTHORITY method for every class (deprecated)
o UNIVERSAL::AUTHORITY::Lexical - an AUTHORITY method for every class, within a lexical scope
o authority - load modules only if they have a particular authority
Background reading: <http://feather.perl6.nl/syn/S11.html>, <http://www.perlmonks.org/?node_id=694377>.
AUTHOR
Toby Inkster <tobyink@cpan.org>.
COPYRIGHT AND LICENCE
This software is copyright (c) 2011 by Toby Inkster.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
DISCLAIMER OF WARRANTIES
THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
perl v5.14.2 2011-12-15 authority::shared(3pm)