Hi ,
i export the crontab in a file (i've no root right) and i would add lines from a file at a special place and rewrite the output in an another file.
the special place is as this :
45 04 * * * /home/toto.sh > /dev/null 2>&1
#
so i would search for toto.sh and insert the lines , the... (5 Replies)
Suppose content of my first file:
first line
second line
third line
How can i insert text between "first line" & "second Iline"
Any help?????/ (7 Replies)
Hi All,
i am trying to remove all special charecters().,/\~!@#%^$*&^_- and others from a tab delimited file.
I am using the following code.
while read LINE
do
echo $LINE | tr -d '=;:`"<>,./?!@#$%^&(){}'|tr -d "-"|tr -d "'" | tr -d "_"
done < trial.txt > output.txt
Problem
... (10 Replies)
I am attempting to insert multiple lines of text into a specific place in a text file based on the lines above or below it.
For example, Here is a portion of a zone file.
IN NS ns1.domain.tld.
IN NS ns2.domain.tld.
IN ... (2 Replies)
Hi,
I have a file which has numerous lines and some of the lines having special characters in it. i want to grep the lines which are having special characters.
say,
one line looks like - %*()$#@"", | acbd
antoher line looks like ***##^%! | efcg
so these kind of lines are present... (5 Replies)
Hi All,
My source file contains special characters(Latin characters).I need to fetch only the lines which contains the special characters. The problem is i don't know which all latin/special characters can come in the source.
Is there anyway to extract the lines which contain letters other... (3 Replies)
Hi
I have a file and need to extract lines starting with "grep ^"
I tried with quotes single/double before/after but no luck.
suggestion pls, thanks! (2 Replies)
Hi,
I've 2 queries.
I need to list files which doesn't contain a particular text in the content. For example say, I need to list files which doesn't contain string "abc" from all files ending with *.bad. How can I do that?
Also, I want to display number of lines in a file which has atleast... (2 Replies)
Hi,
I need to create a test text file with the special characters \342\200\223 in it and to be able to use sed maybe to delete them
I tried doing it using vi by pressing CTRL-V and then typing 342 but it does not work. After pressing CTRL-V and typing 342 it seems to just insert the numbers... (1 Reply)
Discussion started by: newbie_01
1 Replies
LEARN ABOUT DEBIAN
devel::trace
Trace(3pm) User Contributed Perl Documentation Trace(3pm)NAME
Devel::Trace - Print out each line before it is executed (like "sh -x")
SYNOPSIS
perl -d:Trace program
DESCRIPTION
If you run your program with "perl -d:Trace program", this module will print a message to standard error just before each line is executed.
For example, if your program looks like this:
#!/usr/bin/perl
print "Statement 1 at line 4
";
print "Statement 2 at line 5
";
print "Call to sub x returns ", &x(), " at line 6.
";
exit 0;
sub x {
print "In sub x at line 12.
";
return 13;
}
Then the "Trace" output will look like this:
>> ./test:4: print "Statement 1 at line 4
";
>> ./test:5: print "Statement 2 at line 5
";
>> ./test:6: print "Call to sub x returns ", &x(), " at line 6.
";
>> ./test:12: print "In sub x at line 12.
";
>> ./test:13: return 13;
>> ./test:8: exit 0;
This is something like the shell's "-x" option.
DETAILS
Inside your program, you can enable and disable tracing by doing
$Devel::Trace::TRACE = 1; # Enable
$Devel::Trace::TRACE = 0; # Disable
or
Devel::Trace::trace('on'); # Enable
Devel::Trace::trace('off'); # Disable
"Devel::Trace" exports the "trace" function if you ask it to:
import Devel::Trace 'trace';
Then if you want you just say
trace 'on'; # Enable
trace 'off'; # Disable
TODO
o You should be able to send the trace output to the filehandle of your choice.
o You should be able to specify the format of the output.
o You should be able to get the output into a string.
We'll see.
LICENSE
Devel::Trace 0.11 and its source code are hereby placed in the public domain.
Author
Mark-Jason Dominus (C<mjd-perl-trace@plover.com>), Plover Systems co. See the C<Devel::Trace.pm> Page at
http://www.plover.com/~mjd/perl/Trace for news and upgrades.
perl v5.14.2 2012-02-16 Trace(3pm)