05-03-2006
you could use sed to print the pattern in between tags, e.g.
John Daggett, 341 King Road, Plymouth MA
Alice Ford, 22 East Broadway, Richmond VA
Orville Thomas, 11345 Oak Bridge Road, Tulsa OK
Terry Kalkas, 402 Lans Road, Beaver Falls PA
Eric Adams, 20 Post Road, Sudbury MA
Hubert Sims, 328A Brook Road, Roanoke VA
Amy Wilde, 334 Bayshore Pkwy, Mountain View CA
Sal Carpenter, 73 6th Street, Boston MA
this is my infile contents. Now I am only cutting the tage between PA and VA
and putting this segment into the new file say txt.
$sed -n "/PA/,/VA/p" infile > txt1
$cat txt
Terry Kalkas, 402 Lans Road, Beaver Falls PA
Eric Adams, 20 Post Road, Sudbury MA
Hubert Sims, 328A Brook Road, Roanoke VA
hope this helps you out in getting ur things done.
-Manish Jha
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
hi all.....
i want to know how to log the details when logging into a server using SFTP......in FTP i used something like (ftp -uv<xxx.srp>>log_file.log) where the details will be logged to log_file...is there any options for doing the same in SFTP....i wanted to display the details abt... (4 Replies)
Discussion started by: santy
4 Replies
2. Shell Programming and Scripting
Hi,
I have a .log file in which it has many values. But i need some specific values. How it can be done using Shell Script. Please explain in detail.
Thankx in advance.
Sathish D V. (8 Replies)
Discussion started by: cooolthud
8 Replies
3. UNIX for Dummies Questions & Answers
Hi Experts,
Im a new bee for scripting,
I would ned to do the following via linux shell scripting, I have an application which throws a log file, on each action of a particular work with the application, as sson as the action is done, the log file would vanish or stops updating there, the... (2 Replies)
Discussion started by: pingnagan
2 Replies
4. Solaris
If we have a big zipped log file, how can we look for a specific string in this zipped log file without unzipping it?
Thanks, (2 Replies)
Discussion started by: Pouchie1
2 Replies
5. UNIX for Dummies Questions & Answers
I have scheduled couple of shell scripts to run using 'at' command.
The o/p of at -l is:
$ at -l
1320904800.a Thu Nov 10 01:00:00 2011
1320894000.a Wed Nov 9 22:00:00 2011
1320876000.a Wed Nov 9 17:00:00 2011
$ uname -a
SunOS dc2prcrptetl2 5.9 Generic_122300-54 sun4u sparc... (2 Replies)
Discussion started by: superparticle
2 Replies
6. UNIX for Advanced & Expert Users
Hi,
Im looking for a shell script which will search for a particular string in a log file as below scenario
1. I need to run URL http://localhost/client/update?feedid=200 in shell script at(eg)4:00 PM which will not take more than 15 mins to complete.
2. After 15 mins i need to... (6 Replies)
Discussion started by: Paulwintech
6 Replies
7. Red Hat
When I see the content in the /var/log/messages, the information is too little. How can I get other informations, such as facility, level, and so on.
I also have another question, where can I collect more err logs, so I can do some fault association analysis. Thank you very much. (1 Reply)
Discussion started by: zhaoyy
1 Replies
8. Shell Programming and Scripting
Hi,
Is it possible to pass oracle connection information from a configuration file and use that to connect to oracle database in my unix shell scripts. Following is the scenario:
(1) I would like to save oracle connection string details in a configuration file (ex., dbconfig.txt)
(2) from my... (6 Replies)
Discussion started by: sudhakaratp
6 Replies
9. Shell Programming and Scripting
we are getting files on daily basis.we need to process these files.
i need a unix shell script where we can count
1-The no of files processed
2-No of data/record processed for each files.
The script should log these details into a database table. If there is any error while file... (3 Replies)
Discussion started by: Atul kumar
3 Replies
10. UNIX for Beginners Questions & Answers
Hi All,
I have a requirement to get the address values from a large log file along with the user details.
line1,line2,city,stateCode,postalCode,countryCode. The below code as advised in the earlier post is giving the user data
zgrep -B1 "Failed to calculate Tax" log.2018-05-23.gz | grep... (8 Replies)
Discussion started by: nextStep
8 Replies
LEARN ABOUT CENTOS
log::message::config
Log::Message::Config(3) User Contributed Perl Documentation Log::Message::Config(3)
NAME
Log::Message::Config - Configuration options for Log::Message
SYNOPSIS
# This module is implicitly used by Log::Message to create a config
# which it uses to log messages.
# For the options you can pass, see the C<Log::Message new()> method.
# Below is a sample of a config file you could use
# comments are denoted by a single '#'
# use a shared stack, or have a private instance?
# if none provided, set to '0',
private = 1
# do not be verbose
verbose = 0
# default tag to set on new items
# if none provided, set to 'NONE'
tag = SOME TAG
# default level to handle items
# if none provided, set to 'log'
level = carp
# extra files to include
# if none provided, no files are auto included
include = mylib.pl
include = ../my/other/lib.pl
# automatically delete items
# when you retrieve them from the stack?
# if none provided, set to '0'
remove = 1
# retrieve errors in chronological order, or not?
# if none provided, set to '1'
chrono = 0
DESCRIPTION
Log::Message::Config provides a standardized config object for Log::Message objects.
It can either read options as perl arguments, or as a config file. See the Log::Message manpage for more information about what arguments
are valid, and see the Synopsis for an example config file you can use
SEE ALSO
Log::Message, Log::Message::Item, Log::Message::Handlers
AUTHOR
This module by Jos Boumans <kane@cpan.org>.
Acknowledgements
Thanks to Ann Barcomb for her suggestions.
COPYRIGHT
This module is copyright (c) 2002 Jos Boumans <kane@cpan.org>. All rights reserved.
This library is free software; you may redistribute and/or modify it under the same terms as Perl itself.
perl v5.16.3 2013-04-25 Log::Message::Config(3)