Thanks man, but there's one problem, and that is, if there is more than one html tag on the line, it doesn't replace space characters only in the last one. For example: damn <here is> <the problem> transforms into this:
damn
<here
is>
<the problem>
Any idea how to deal with this?
please help in making sed singleline command
i need to insert dos new line (CR LF) before
" 34 matching device(s) found on \\cpu1."
" 6 matching device(s) found on \\cpu7."
" 102 matching device(s) found on \\mainserver."
the problem is that sometimes there are both CR LF before strings and... (1 Reply)
Hi !
I'm rather new with sed ... learned a lot already by googling etc ...
The following script should replace all spaces and ends-of-lines with "something (see below).
#!/bin/bash
i=0
while read line
do
fam="H`printf "%06d" $i`"
echo $line | sed -e 's//\t'$fam'\n/g'
i=$(($i+1))... (7 Replies)
Input:
--------------------------
123asd 456sdasda 789a
-------------------------
output wanted:
---------------------
123asd
456sdasda
789a
----------------------
I want this by sed in simple way
please help (I know by: tr ' ' '\n' < inputfile )I want it by sed only (5 Replies)
Hi,
i have below string -
mynameis arpit
i want output like below -
mynameis\ arpit
that i am getting from below -
temp='mynameis arpit'
echo $temp|sed 's//\\ /g' --> mynameis\ arpit
now i am doing - (2 Replies)
hi!
i'm trying to use sed for this, but i'm struggling a lot. i want to convert
<div class="middle" id="middle">Friday, 20 April 2012<br /> <span class="hex">728CB5</span> <br /></div>
into
fbsetroot -solid '#728CB5'
considering all information between 'id="middle">' and '<br />... (2 Replies)
hi I am trying to use SED to replace the line matching a pattern using the command
sed 'pattern c\
new line
' <file1 >file 2
I got two questions
1. how do I insert a blank space at the beginning of new line?
2. how do I use this command to execute multiple command using the -e... (5 Replies)
`echo $file | sed 's/ / /g'`
Hey guys I want help in converting the spaces in my file names to '\ ' .
Example:
UK maps --> UK\ maps
Could someone please help me.
I have tried the following sequences already (none of them work):
1)s/ /\ /g
2)s/ /\\ /g
3)s/ /\\\ /g
Can someone... (7 Replies)
I need all the end tags of </font> to be replaced with new line yet enclosing tag to be retained </font>. Please help me in this regard.
Input:
<font>abc</font>def<font>ghi</font>
Output:
<font>abc</font>
def
<font>ghi</font> (3 Replies)
Hello
I have a requirement where I need to replace space :61 with !@ :61
Source
:60F:123 :61:151 :61:151 :61:15101
Target
:60F:123 :61:151!@:61:151!@:61:15101
I cant use and command as I don't want the tab to be converted .
commands not working :
sed 's/... (5 Replies)
Discussion started by: kamijia83
5 Replies
LEARN ABOUT DEBIAN
acme::damn
Damn(3pm) User Contributed Perl Documentation Damn(3pm)NAME
Acme::Damn - 'Unbless' Perl objects.
SYNOPSIS
use Acme::Damn;
my $ref = ... some reference ...
my $obj = bless $ref , 'Some::Class';
... do something with your object ...
$ref = damn $obj; # recover the original reference (unblessed)
... neither $ref nor $obj are Some::Class objects ...
DESCRIPTION
Acme::Damn provides a single routine, damn(), which takes a blessed reference (a Perl object), and unblesses it, to return the original
reference.
EXPORT
By default, Acme::Damn exports the method damn() into the current namespace. Aliases for damn() (see below) may be imported upon request.
Methods
damn object
damn() accepts a single blessed reference as its argument, and returns that reference unblessed. If object is not a blessed reference,
then damn() will "die" with an error.
bless reference
bless reference [ , package ]
bless reference [ , undef ]
Optionally, Acme::Damn will modify the behaviour of "bless" to allow the passing of an explicit "undef" as the target package to invoke
damn():
use Acme::Damn qw( bless );
my $obj = ... some blessed reference ...;
# the following statements are equivalent
my $ref = bless $obj , undef;
my $ref = damn $obj;
NOTE: The modification of "bless" is lexically scoped to the current package, and is not global.
Method Aliases
Not everyone likes to damn the same way or in the same language, so Acme::Damn offers the ability to specify any alias on import, provided
that alias is a valid Perl subroutine name (i.e. all characters match "w").
use Acme::Damn qw( unbless );
use Acme::Damn qw( foo );
use Acme::Damn qw( unblessthyself );
use Acme::Damn qw( recant );
Version 0.02 supported a defined list of aliases, and this has been replaced in v0.03 by the ability to import any alias for "damn()".
WARNING
Just as "bless" doesn't call an object's initialisation code, "damn" doesn't invoke an object's "DESTROY" method. For objects that need to
be "DESTROY"ed, either don't "damn" them, or call "DESTROY" before judgement is passed.
ACKNOWLEDGEMENTS
Thanks to Claes Jacobsson <claes@surfar.nu> for suggesting the use of aliases, and Bo Lindbergh <blgl@cpan.org> for the suggested
modification of "bless".
SEE ALSO
bless, perlboot, perltoot, perltooc, perlbot, perlobj.
AUTHOR
Ian Brayshaw, <ian@onemore.org>
COPYRIGHT AND LICENSE
Copyright 2003-2012 Ian Brayshaw
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.14.2 2012-02-14 Damn(3pm)