11-02-2003
searching for {
Hello,
I am having a hard time trying to do the following:
I have a file that looks like this:
0 CacheMaxConn 4 64
0 RMThread 16 3423423
7 DataSource 0 /hello/sas/ses
0 {94545B4-E343-1410-81E4-08000000} 3 DDBE
3 Source 9 dfskf
if the second part of the line in the text file starts with "{" I want to ignore it.
any help would be appreciated
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Guys
Im checking some of my files for errors. I want to be able to find text and make sure it's located on the right place.
Example
Chapter 1
TEXT LKJ
TEXT 12Y
more and more text
Chapter 2
TEXT 34G
TEXT HHG
more and more text
Chapter 3
TEXT FG45
TEXT 11w
more and more text
... (3 Replies)
Discussion started by: tony3101
3 Replies
2. UNIX for Advanced & Expert Users
Hi,
I have a file
/db01/dat/march 2006/7001DW06.03B
Please note, between "march 2006" there is a space/tab.
While running the following script, it identifies
/db01/dat/march ----> as first file
2006/7001DW06.03B ---> as second file.
SRC_PATH = /db01/dat
SEARCH_FILENAME =... (12 Replies)
Discussion started by: ronald_brayan
12 Replies
3. Shell Programming and Scripting
Hi
At the moment I am able to add text to a file but what I need to do is make sure the same value is not duplicated.
Can anyone tell me how to search a file and prevent an update from taking place if the value to be entered already exists in the file?
Any help would be greatly... (4 Replies)
Discussion started by: straight_edge
4 Replies
4. UNIX for Dummies Questions & Answers
Hi,
I would like to do a search and replace on a file using vi.
Something like this:
:%s/dst_port=****//g
I want to search the entire file and replace all text that does not match dst_port=**** with space or nothing. In other words delete everything except for dst_port=****. The four *... (1 Reply)
Discussion started by: andyblaylock
1 Replies
5. Shell Programming and Scripting
Hi! i'm trying to do a script (i'm not an expert, as you will see...:o) to search files in a directory (and its subdirectories). I'd like to have something like this:
mysearch -a arg1 -b arg2 -c arg3 ecc...
I'd like to be able to search for files in different ways: for example, with
my... (1 Reply)
Discussion started by: Kaminski
1 Replies
6. UNIX for Dummies Questions & Answers
How would i search to find all the lines consisting of of only the letter "z" followed by any four characters? (1 Reply)
Discussion started by: trob
1 Replies
7. UNIX for Advanced & Expert Users
Hi, I have the following command to list files beginning with a specific name and containing some text...
find . -type f -name "dm_merge_domain_adm*" -exec grep -il "Error Message:" '{}' \; -print|xargs ls -ltr
It works fine, but seems to list two of each file, when they only exist once...any... (1 Reply)
Discussion started by: chrislluff1976
1 Replies
8. Shell Programming and Scripting
I am making a script but having little problem. at one part I need to find one number format or other format from a file..
those formats are xxx-xx-xxxx or xxxxxxxxx
i tried
grep '( \{3\}-\{2\}-\{3\} |\{9\})'
if i do them sepratly it work but like this it is not working
Please check... (7 Replies)
Discussion started by: Learnerabc
7 Replies
9. UNIX for Dummies Questions & Answers
Hi guys,
I have a very common issue :( im trying to work it out but I am still not used to it. my problem is searching. very often I should look for piece of string in a text file or a file itself:
I want to learn some easy and professional commands to ease this routine for me. I want to be... (2 Replies)
Discussion started by: messi777
2 Replies
10. Shell Programming and Scripting
without using conventional file searching commands like find etc, is it possible to locate a file if i just know that the file that i'm searching for contains a particular text like "Hello world" or something? (5 Replies)
Discussion started by: arindamlive
5 Replies
LEARN ABOUT DEBIAN
dbix::datasource::driver
DataSource::Driver(3) User Contributed Perl Documentation DataSource::Driver(3)
NAME
DBIx::DataSource::Driver - Driver Writer's Guide and base class
SYNOPSIS
perldoc DBIx::DataSource::Driver;
or
package DBIx::DataSource::FooBase;
use DBIx::DataSource::Driver;
@ISA = qw( DBIx::DataSource::Driver );
DESCRIPTION
To implement a driver for your database:
1) If you can create a database with an SQL command through DBI/DBD, simply
provide a parse_dsn class method which returns a list consisting of the
*actual* data source to use in DBI->connect and the SQL.
package DBIx::DataSource::NewDatabase;
use DBIx::DataSource::Driver;
@ISA = qw( DBIx::DataSource::Driver );
sub parse_dsn {
my( $class, $action, $dsn ) = @_;
# $action is `create' or `drop'
# for example, if you parse parse $dsn for $database,
# $sql = "$action $database";
# you can die on errors - it'll be caught
( $new_dsn, $sql );
}
2) Otherwise, you'll need to write create_database and drop_database
class methods.
package DBIx::DataSource::NewDatabase;
sub create_database {
my( $class, $dsn, $user, $pass ) = @_;
# for success, return true
# for failure, die (it'll be caught)
}
sub drop_database {
my( $class, $dsn, $user, $pass ) = @_;
# for success, return true
# for failure, die (it'll be caught)
}
AUTHOR
Ivan Kohler <ivan-dbix-datasource@420.am>
COPYRIGHT
Copyright (c) 2000 Ivan Kohler Copyright (c) 2000 Mail Abuse Prevention System LLC All rights reserved. This program is free software; you
can redistribute it and/or modify it under the same terms as Perl itself.
BUGS
SEE ALSO
DBIx::DataSource, DBIx::DataSource::mysql, DBIx::DataSource::Pg, DBI
perl v5.8.0 2000-09-25 DataSource::Driver(3)