hi all,
I have a text file with following content
PAGENUMBER
asasasa
asasasa
PAGENUMBER
sasasasasa
PAGENUMBER
using sed i want to replace PAGENUMBER by occurrence count
eg
1
asasasa
asasasa
2
sasasasasa
3 (4 Replies)
Ok,
So I have a huge file that has over 12000 lines in it.
in this file, there are 589 occurrences of the string "use five-minute-interval" spread in various areas in the file.
How can i replace the the last 250 of the occurrences of "use five-minute-interval" with "use... (10 Replies)
Thanks for the help yesterday. I have a little modification today,
I am trying the following:
i have a log file of a webbap which logs in the following pattern:
2011-08-14 21:10:04,535 blablabla ERROR Exception1 blablabla
bla
bla
bla
bla
2011-08-14... (2 Replies)
Guys,
I am trying the following:
i have a log file of a webbap which logs in the following pattern:
2011-08-14 21:10:04,535 blablabla ERROR blablabla
bla
bla
bla
bla
2011-08-14 21:10:04,535 blablabla ERROR blablabla
bla
bla
bla
... (6 Replies)
Hi
I have requirement to find nth occurrence in a file and capture data from with in lines (between lines)
Data in File.
<QUOTE>
<SESSION>
<ATTRIBUTE NAME='Parameter Filename' VALUE='file1.parm'/>
<ATTRIBUTE NAME='Service Name' VALUE='None'/>
</SESSION>
<SESSION>
<ATTRIBUTE... (6 Replies)
Hi, i have file f1.txt with data like:
CHECK
a
b
CHECK
c
d
CHECK
e
f
JOB_START
....
I want to match the last occurrence of 'CHECK' until the end of the file.
I can use awk:
awk '/^CHECK/ { buf = "" } { buf = buf "\n" $0 } END { print buf }' f1.txt | tail +2Is there a cleaner way of... (2 Replies)
Hi
I need help on this ..!!
Input :
xx_abc_regA
xx_def_regB
xx_qwe_regC
Now i required the output as the below
abc
def
qwe
Need to remove last occurrence of character (_) and rest of the string in Unix (sed).
Thanks in Advance ..!!!
-Nallachand (3 Replies)
Hello
how to find last occurence of a string
for example in the following I want last occurence of '-' i.e. position 12
str="aa-bbb-cccc-ddd-ee"
my pupose is to get the string 'ee'
Thanks and Regards
Chetanz (5 Replies)
Hi,
I would like to know how, using sed, be able to insert contents of file2 in file1 after say the second occurrence of a given string? e.g.
> cat file1
banana
apple
orange
apple
banana
pear
tangerine
apple
> cat file2
I don't like apples
What would be the sed command to insert... (5 Replies)
Hi, i have file file.txt with data like:
START
03:11:30 a
03:11:40 b
END
START
03:13:30 eee
03:13:35 fff
END
jjjjjjjjjjjjjjjjjjjjj
START
03:14:30 eee
03:15:30 fff
END
ggggggggggg
iiiiiiiiiiiiiiiiiiiiiiiii
I want the below output
START (13 Replies)
Discussion started by: Jyotshna
13 Replies
LEARN ABOUT DEBIAN
devel::caller::ignorenamespaces
Devel::Caller::IgnoreNamespaces(3pm) User Contributed Perl Documentation Devel::Caller::IgnoreNamespaces(3pm)NAME
Devel::Caller::IgnoreNamespaces - make available a magic caller() which can ignore namespaces that you tell it about
SYNOPSIS
package Foo::Bar
use Devel::Caller::IgnoreNamespaces;
Devel::Caller::IgnoreNamespaces::register(__PACKAGE__);
DESCRIPTION
If your module should be ignored by caller(), just like Hook::LexWrap is by its magic caller(), then call this module's register()
subroutine with its name.
SUBROUTINES
register('packagename', 'anotherpackage', ...)
Takes a list of packages that caller() will ignore in future.
BUGS and FEEDBACK
Please report any bugs using <http://rt.cpan.org>. The best bug reports include a file with a test in it that fails with the current code
and will pass once the bug is fixed.
I welcome feedback, especially constructive criticism, by email.
Feature requests are more likely to be accepted if accompanied by a patch and tests.
AUTHORS, COPYRIGHT and LICENCE
This module is maintained by David Cantrell <david@cantrell.org.uk> and based almost entirely on code by Damian Conway.
Copyright 2001-2008 Damian Conway
Documentation and tests and some code copyright 2009 David Cantrell
You may use, modify and distribute this code under either the Artistic Licence or the GNU GPL version 2. See the ARTISTIC.txt or GPL2.txt
files for the full texts of the licences.
perl v5.10.1 2009-08-19 Devel::Caller::IgnoreNamespaces(3pm)