08-09-2012
Hi Rudic/Franklin52,
I am able to remove first 549 characters and then reformatting every line of 100 characters.
The only problem i am facing is that i am not able to delete data from the line i encounter CONTRA word where C is at character position 65 and ends at A with position 70.
ps: yes Franklin52 i have formatted input file which has a bit diffn format. from the one posted above.
eg.
VOL1000000 851447 1^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
HDR1A851447S 00000000010001 12199 12201 000000 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
HDR2F0200000100 00 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
UHL1 12200999999 000000001 DAILY 001 0000 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
******************^^^^^^^^^^^^^^
5555555555555555555555555555555 5555555555555555 44444445 555AAAAAA ZXXXXCONTRACTORS
5555555555555555555555555555555 5555555555555555 44444445 555AAAAAA ZXXXXXXXXXXXXXXXXX
5555555555555555555555555555555 5555555555555555 44444445 555AAAAAA ZXXXXXXXXXXXXXXXXX
5555555555555555555555555555555 555555555 55555 44444445 555CONTRA ZXXXXXXXXXXXXXXXXX
5555555555555555555555555555555 5555555555555555 44444445 555CONTRA ZXXXXXXXXXXXXXXXXX
5555555555555555555555555555555 5555555555555555 44444445 555AAAAAA ZXXXXXXXXXXXXXXXXX
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a file with the below lines
1521
1522
1523
1524
1525
1526
...
174 lines all numbers like above. I want the above file to appear as below.
1521,1522,1523,1524.....
All the numbers should be separated by comma.
Pls tell me how to do this ....
Thanks in advance. (8 Replies)
Discussion started by: dreams5617
8 Replies
2. Shell Programming and Scripting
Hi
I have to do the following.I have to format a file test.t
The contents are
# Header 1231
xyz
asdf
asdapsdcsd
//string1 = "pqrs"
//string1 = "abcd"; //info
//string1 = "*pqrs"; //add
string1 = "#123"; //sub
//string1 = "#1234567890"
data = check(string1)
//string1 = "#1234567890"... (12 Replies)
Discussion started by: gopsman
12 Replies
3. Shell Programming and Scripting
How to add the filename to end of each line with | as seperator, except first and last line of the file(s) in directories(with diff tree structure) using shell script?. And also how to replace a list of strings with another set of strings, which is present in a file?.
Kindly help out on... (1 Reply)
Discussion started by: av_vinay
1 Replies
4. Shell Programming and Scripting
Hi,
I am writing a script and I need to calculate last weeks date.
I get the current date as;
today=`date '+%Y%m%d'`
and I need last week inthe same format.
Thanks, (2 Replies)
Discussion started by: ozum
2 Replies
5. Shell Programming and Scripting
I have a file with contents something similar to as below :
SVCNAME,12m-1a,1a-2a,2a-3a,3a-4a,5a-6a,6a-7a,7a-8a,8a-9a,9a-10a,10a-11a,11a-12n,12n-1p,13p-14p,14p-15p,15p-16p,16p-17p,17p-18p,18p-19p,19p-20p,20p-21p,21p-22p,22p-23p,11p-12m, TOTALS... (5 Replies)
Discussion started by: deo_kaustubh
5 Replies
6. Shell Programming and Scripting
Hello,
I'm having trouble with formatting some text via the terminal. I can get it perfectly formatted, but when I try and copy paste the text from the output file it loses it's formatting. Very frustrating!
Basically I have 7 files (data data2 data3 data4 data5 data6 data7) containing a... (13 Replies)
Discussion started by: facetoe
13 Replies
7. Shell Programming and Scripting
there is one shell which calls for different sql scripts.
output of different are formatted in frame like structure.i want columnar wise formatting to be done in such a manner that output of one sql may be comon input of rest sqls .
ERC DML
Closure Date
ER DML
SAP Transfer Date
... (0 Replies)
Discussion started by: arc
0 Replies
8. Shell Programming and Scripting
Hi All,
Need an urgent help to convert a unix file in to a particular format:
**source file:**
1111111
2d2f2h2
3dfgsd3
...........
1111111 <-- repeats in every nth line. remaining all lines will be different
123ss41
432ff45
...........
1111111 <-- repetition
qwe1234
123weq3... (1 Reply)
Discussion started by: rajivnairfis
1 Replies
9. Shell Programming and Scripting
Hi,
Please find the below lines of a file
B1/OT "GIB10" 837 130308 1351 MONORONOUS DIGI PATH FAULT SUPER
B1/OT "GIB10" 520 130418 1537 MONORONOUS DIGI PATH FAULT SUPER
B1/XT "GIB10" 762 130421 0653 TV Y-CEIVER ADMIN RXOCF-62 241_OKEBOLE_NEW 1
B1/XT "GIB10" 385 130425 1931 TV Y-CEIVER... (2 Replies)
Discussion started by: Ardhendu
2 Replies
10. Shell Programming and Scripting
Dear all,
I am new to shell scripting and have tried to make a small program for fun sake that tells age from the last number of cell phone and birth year.
At the end we get a final 3 digit number and the first digit represents the last digit of cell phone and rest 2 numbers shows age. eg. 423... (4 Replies)
Discussion started by: stg44
4 Replies
LEARN ABOUT MOJAVE
net::ldap::control::postread5.18
Net::LDAP::Control::PostRead(3) User Contributed Perl Documentation Net::LDAP::Control::PostRead(3)
NAME
Net::LDAP::Control::PostRead - LDAPv3 Post-Read control object
SYNOPSIS
use Net::LDAP;
use Net::LDAP::Control::PostRead;
use Net::LDAP::Constant qw( LDAP_CONTROL_POSTREAD LDAP_SUCCESS );
$ldap = Net::LDAP->new( "ldap.mydomain.eg" );
$postread = Net::LDAP::Control::PostRead->new( attrs => [ qw/givenName/ ] );
my $mesg = $ldap->modify( "cn=Barbara Jensen, o=University of Michigan, c=US",
replace => { givenName => "Babs" },
control => $postread );
if ($mesg->code eq LDAP_SUCCESS) {
my ($afterwards) = $mesg->control( LDAP_CONTROL_PREREAD );
my $entry = $afterwards ? $afterwards->entry() : undef;
if ($entry) {
print "givenName changed to '" .
join("', '", $entry->get_value(givenName") .
"' to 'Babs'
");
}
}
DESCRIPTION
"Net::LDAP::Control::PostRead" provides an interface for the creation and manipulation of objects that represent the "Post-Read Controls"
as described by RFC 4527.
In modification operations, the "Post-Read request control" indicates to the server that a copy of the modified entry after the update is
to be returned. After the successful completion of the operation, the accompanying "Post-Read response control" allows one to retrieve the
updated value from the server's response.
One use case of this control may be to obtain values of operational attributes, such as the "entryUUID" and "modifyTimestamp" attributes,
updated by the server as part of the update operation.
CONSTRUCTOR ARGUMENTS
In addition to the constructor arguments described in Net::LDAP::Control the following are provided.
attrs => [ ATTR, ... ]
A list of attributes to be returned in the entry returned in the response control.
If absent, all attributes are returned.
Operational attributes may be included in the list by explicitly asking for them or by using special "+" feature (provided the server
supports this feature).
METHODS
As with Net::LDAP::Control each constructor argument described above is also available as a method on the object which will return the
current value for the attribute if called without an argument, and set a new value for the attribute if called with an argument.
In addition to these methods, the control also supports the following method:
entry ()
Returns the entry from the response control in the response message to the LDAP request that contained the request control.
The result is either a Net::LDAP::Entry object or undefined.
SEE ALSO
Net::LDAP, Net::LDAP::Control, http://www.ietf.org/rfc/rfc4527.txt
AUTHOR
Peter Marschall <peter@adpm.de>
Please report any bugs, or post any suggestions, to the perl-ldap mailing list <perl-ldap@perl.org>
COPYRIGHT
Copyright (c) 2008,2011 Peter Marschall. All rights reserved. This program is free software; you can redistribute it and/or modify it under
the same terms as Perl itself.
perl v5.18.2 2013-07-21 Net::LDAP::Control::PostRead(3)