Hi All,
I am just learning shell programming,
I need to do the following in my shell script.
Search a given log file for two\more strings.
If the the two\more strings are found then write it to a outputfile else
if only one of the string is found, write the found string in one output... (2 Replies)
Hi All,
I want to search all the ksh scripts that has following details.
1. Search for "exit 0"
2. Search for "sqlldr" or sqlplus"
3. In the above files i want to search for all the script that has no "case" in it.
Please advice.
Thanks,
Deep (2 Replies)
Hi,
I have to search and count unique occurence of DE numbers in bold below in a file which has content like below.
Proc Tran F-BUY
Item Tkey Q5JV
Item Tsid JTIZ9
Item Tdat 20091001
Item Tset 20091001
Item Tbkr 5
Item Tshs 2
Item Tprc 897.0
Item Tcom 2000.0
Item Tcm1 20091001... (6 Replies)
Can someone help me? I been figuring out how I can search and extract a complicated search string from a file. The whole string is delimited by a period. And the file where I'm searching is composed of differnt string such as that. For example, I have this search string:
and I have a file... (3 Replies)
Hi folks,
I have a file which contains several occurences of 2 different patterns. I need to find out the line of first occurence of pattern2 starting after the position of first occurence of pattern1.
example file:
aaaa
pattern2
bbbb
pattern1
ccc
pattern2
ddd
pattern1
eee
pattern2... (9 Replies)
Hi
I want to search multiple strings in a file . But the search should start with "From" Keyword and end with before "Where" keyword.
Please suggest me.
Thanks (2 Replies)
Hi
I want to search for a specific pattern in file
Say
ABC;HELLO_UNIX_WORLD;PQR
ABC;HELLO_UNIX_WORLD_IS_NOT_ENOUGH;XYZ
ABC;HELLO_UNIX_FORUM;LMN
Pattern to search is : "HELLO_UNIX_*****" and not "HELLO_UNIX_***_***_"
I mean after "HELLO_UNIX" there can only be one word.In this case... (2 Replies)
I have a file search_strings.txt filled with search strings which have a blank in between and look like this:
S. g. Erh.
o. J.
v. d. Chijs
g. Ehr.I would like to search the strings in the second given Textfile.txt and it shall return the column number.
Can anybody help with the correct... (3 Replies)
Hi guys,
I have a text file named file1.txt that is formatted like this:
001 , ID , 20000
002 , Name , Brandon
003 , Phone_Number , 616-234-1999
004 , SSNumber , 234-23-234
005 , Model , Toyota
007 , Engine ,V8
008 , GPS , OFF
and I have file2.txt formatted like this:
... (2 Replies)
Here is my sample file data:
My requirement is to have a regex expression that is able to search for visible starting string "SSLInsecureRenegotiation Off" between strings "<VirtualHost " and "</VirtualHost>".
In the sample data two lines should be matched.
Below is what I tried but... (5 Replies)
Discussion started by: mohtashims
5 Replies
LEARN ABOUT DEBIAN
io::innerfile
IO::InnerFile(3pm) User Contributed Perl Documentation IO::InnerFile(3pm)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.12.4 2005-02-10 IO::InnerFile(3pm)