It assumes that quotes to be kept are at the beginning/ending of the line, or are either preceded or trailed by a comma. It will not handle the case where something like 3" in the text is followed by a comma:
If you have cases like this, then you'll need something a bit more robust.
Oh yea, it assumes no tildas (~) in the input!
Last edited by agama; 07-08-2011 at 12:21 AM..
Reason: clarification
Hi Can any one help me remove the unwanted data? I would want to remove the complete event id 4910 ( the type there is INFO), that means, I have to remove starting from 7th - 19th lines. can any one of you please help?
Thanks, (24 Replies)
I have set of sources and the respective resolution. Please advice how to resolve the same using Unix shell scripting.
Source 1:
=======
<ext:ContactInfo xmlns:ext="urn:AOL.FLOWS.Extensions">
<ext:InternetEmailAddress>AOL@AOL.COM</ext:InternetEmailAddress>
</ext:ContactInfo>
Resoultion... (1 Reply)
I got a system which was installed with SUNWCXall cluster installed on it and i want remove unwanted software like GMNOME, Java Desktop System, Staroffice and numerous other softwares .. i want to do an automated removal of these packages where its uninstalled by itself ..from the is there any... (4 Replies)
Hi,
I've a string "200910/22-101010" ( this is date and time string YYYYMMDD/HHMMSS format) , how can i remove "/" and assign it to a new variable a value of 20091022 only
thanks (6 Replies)
We have a huge makefile composing of inclusion of libraries, objects and system libraries to generate a binary.
How do we find out that which of the libraries we can remove in the most efficient way? Doing hit and trial method is a waste of time and can during the linking with some post linking... (12 Replies)
I have a .xml file, where i need some output. The xml file is like:
Code:
<?******?></ddddd><sssss>234</dfdffsdf><sdhjh>534</dfdfa>.........
/Code
I need the output like:
code
234
534
.
.
.
/code
How can i do it? (5 Replies)
This is the way
sed -i 's/home/$USER/.config/hello_there//g' /home/$USER/.gnomerc
But, as far as I saw you cannot add any "/" in the string you want to remove....
So, what should I do in order to remove this path (which contains "/") ?:confused: (7 Replies)
Hi Guys,
Can someone give me a hand on how I can remove unwanted strings like "<Number>" and "</Number>" and retain only the numbers from the input file below.
INPUT FILE:
<Number>10050000</Number>
<Number>1001340001</Number>
<Number>1001750002</Number>
<Number>100750003</Number>... (8 Replies)
logs:
"/home/abc/public_html/index.php"
"/home/abc/public_html/index.php"
"/home/xyz/public_html/index.php"
"/home/xyz/public_html/index.php"
"/home/xyz/public_html/index.php"
how to use "cut" or "awk" or "sed" to get the following result:
abc
abc
xyz
xyz
xyz (8 Replies)
Hi Everyone, i am new to scripting and stuck in something.
Query is : I have a properties file eg. data.properties.
This data.properties have some values
example :
key1=value1
key2=value2
#key3=value3
as key3 is commented by #.
so i want to write a script , that will remove # from... (3 Replies)
Discussion started by: Raj87ng
3 Replies
LEARN ABOUT DEBIAN
paranoid::log::file
Paranoid::Log::File(3pm) User Contributed Perl Documentation Paranoid::Log::File(3pm)NAME
Paranoid::Log::File - File Logging Functions
VERSION
$Id: File.pm,v 0.83 2010/04/15 23:23:28 acorliss Exp $
SYNOPSIS
use Paranoid::Log;
enableFacility('events', 'file', 'debug', '+', $filename);
DESCRIPTION
This module logs messages to the log files, and is safe for use with forked children logging to the same files. Each child will open their
own filehandles and use advisory locking for writes.
This module should not be used directly, Paranoid::Log should be your exclusive interface for logging.
SUBROUTINES /METHODS
NOTE: Given that this module is not intended to be used directly nothing is exported.
init
log
remove
dump
DEPENDENCIES
o Fcntl
o Paranoid::Debug
o Paranoid::Filesystem
o Paranoid::Input
SEE ALSO
o Paranoid::Log
BUGS AND LIMITATIONS
This isn't a high performance module when dealing with a high logging rate with high concurrency. This is due to the advisory locking
requirement and the seeks to the end of the file with every message. This facility is intended as a kind of lowest-common demoninator for
programs that need some kind of logging capability.
AUTHOR
Arthur Corliss (corliss@digitalmages.com)
LICENSE AND COPYRIGHT
This software is licensed under the same terms as Perl, itself. Please see http://dev.perl.org/licenses/ for more information.
(c) 2005, Arthur Corliss (corliss@digitalmages.com)
perl v5.14.2 2010-04-15 Paranoid::Log::File(3pm)