Hi,
I have a challenging task,in which i have to find the duplicate files by its name and size,then i need to take anyone of the file.Then i need to open the file and find for more than one pattern and count of that pattern.
Note:These are the samples of two files,but i can have more... (2 Replies)
Hi,
I am trying to locate the occurences of certain pattern like 'Possible network disconnect' in a text file. I can get the actual lines matching the pttern using:
grep -w 'Possible network disconnect' file_name.
But I am more interested in getting the timing of these events which are... (7 Replies)
Hello,
Could someone help me with sed. I have searched for solution 5 days allready :wall:, but cant find. Unfortunately my "sed" knowledge not good enough to manage it. I have the text:
123, foo1, bar1, short text1, dat1e, stable_pattern
124, foo2, bar2, long text
with few
lines, date,... (4 Replies)
Hi,
I have a data file where data is splitted into multiple lines. And, each valid record starts with a patten date | <?xml and ends with pattern </dmm>
e.g.
20120924|<?xml record 1 line1....record 1 line1....record 1 line1....
record 1 line2....record 1 line2....record 1 line2....
record 1... (3 Replies)
I am trying to Join all the lines matching similar pattern.
Example ;
I wanted to join all the lines which has sam to a single line.
In next line, i wanted to have all the lines with jones to a single line....etc
> cat sample.txt
sam 2012/11/23
sam 2012/12/5
sam 2012/12/5
jones... (2 Replies)
i have little challenge, help me out.i have a file where i have a value declared and and i have to replace the value when called. for example i have the value for abc and ccc. now i have to substitute the value of
value abc and ccc in the place of them.
Input File:
go to &abc=ddd;
if... (16 Replies)
I know how to search for a pattern/regular expression in many files that I have in a directory. For example, by doing this:
grep -Ril "News/U.S." .
I can find which files contain the pattern "News/U.S." in a directory.
I am unable to accomplish about how to extend this code so that it can... (1 Reply)
The intended result should be :
PDF converters
'empty line'
gpdftext and pdftotext?xml version="1.0"?>
xml:space="preserve"><note-content version="0.1" xmlns:/tomboy/link" xmlns:size="http://beatniksoftware.com/tomboy/size">PDF converters
gpdftext and pdftotext</note-content>... (9 Replies)
Hi all
OS - RHEL6.4
I have input file -f1.txt
I need to search line which starts with \Start and read next line till it gets blank line and join them all. I need to trim any trailing spaces for each line.So output.txt should be..
\Start\now\fine stepwatch this space for toolsends... (7 Replies)
I have a file like below.
2018.07.01, Sunday
09:27 some text 123456789 0 21 0.06 0.07 0.00
2018.07.02, Monday
09:31 some text 123456789 1 41 0.26 0.32 0.00
09:39 some text 456789012 1 0.07 0.09 0.09
09:45 some text 932469494 1 55 0.29 0.36 0.00
16:49 some text 123456789 0 48 0.12 0.15 0.00... (9 Replies)
Discussion started by: father_7
9 Replies
LEARN ABOUT CENTOS
io::innerfile
IO::InnerFile(3) User Contributed Perl Documentation IO::InnerFile(3)NAME
IO::InnerFile - define a file inside another file
SYNOPSIS
### Read a subset of a file:
$inner = IO::InnerFile->new($fh, $start, $length);
while (<$inner>) {
...
}
DESCRIPTION
If you have a filehandle that can seek() and tell(), then you can open an IO::InnerFile on a range of the underlying file.
PUBLIC INTERFACE
new FILEHANDLE, [START, [LENGTH]]
Class method, constructor. Create a new inner-file opened on the given FILEHANDLE, from bytes START to START+LENGTH. Both START and
LENGTH default to 0; negative values are silently coerced to zero.
Note that FILEHANDLE must be able to seek() and tell(), in addition to whatever other methods you may desire for reading it.
set_length LENGTH
get_length
add_length NBYTES
Instance methods. Get/set the virtual length of the inner file.
set_start START
get_start
add_start NBYTES
Instance methods. Get/set the virtual start position of the inner file.
binmode
close
flush
getc
getline
print LIST
printf LIST
read BUF, NBYTES
readline
seek OFFFSET, WHENCE
tell
write ARGS...
Instance methods. Standard filehandle methods.
VERSION
$Id: InnerFile.pm,v 1.4 2005/02/10 21:21:53 dfs Exp $
AUTHOR
Original version by Doru Petrescu (pdoru@kappa.ro).
Documentation and by Eryq (eryq@zeegee.com).
Currently maintained by David F. Skoll (dfs@roaringpenguin.com).
perl v5.16.3 2005-02-10 IO::InnerFile(3)