Afaik no. You can help yourself with maybe putting multiple lines into a function, that will never be called. Let's say we want to "comment" cmd3-5:
Since function dummy will never be called, you will have the effect you are asking for. As with # commented lines, you have to care for correct syntax like if/then/fi, case/esac, while/do/done, for/do/done, and so on.
These 2 Users Gave Thanks to zaxxon For This Post:
Hi
I have a script to delete the multiline comments as below
********************************************
#!/usr/bin/sed -f
#Replaces single line comment
s://.*::
#Replaces multiline comment present in a single line
s:/\**\*/::g
#Starting of the loop for checking the starting of the... (1 Reply)
Hi,
I wish to format the output of a grep command in such a way that sed will be able to handle the newline characters held in the output.
Since sed does not allow newlines to be contained in a replacement pattern, that means adding a backslash '\' character to the end of each line from... (8 Replies)
Requirement is:
1. comment and uncomment the line with Shell
Script: /opt/admin/fastpg/bin/fastpg.exe -c -=NET (using fastpg.exe as a search option)
2. display = "Commented" (when its commented) and display = "Uncommented" (when its uncommented)
Its urgent, please let me asap!!!
Thanks in... (2 Replies)
Hi friends , I want to ignore single and multiline comment( enclosed by " \* *\" ) of a file whle reading it. I am using the below code.
nawk '/\/\*/{f=1} /\*\//{f=0;next} !f' proc.txt | while read str
do
...
done
The problem is its working partially. that is its failing in one... (1 Reply)
Hi all
I have data files which contain data as shown below:
Line 5: FIDE
INST_DESC: DIAM Co Ltd/Japan => MAID Co Ltd/Japan
INST_NME: DIAM Co Ltd/Japan => MAID Co Ltd/Japan
Line 6: FIDE
INST_DESC: DIAM DL/Pimco US Bond Open Born in the USA => MAID DL/Pimco US Bond Open Born in the... (6 Replies)
cd path
line1
line2
line3
line4
line5
Lets say thats the sample script...So say if i have to comment the above script, which would be the better way so that whenever i want, i cud comment or uncomment the same.
Thanks (1 Reply)
Hi,
I have a text like the one given below
status="Observation 1"
read1="Source rows not load"
read2="Score drop"
I want to create a csv and mail it out in such a way that all three lines will be in a single cell but as three lines.
For ex
Col C1
... (3 Replies)
Just began to learn on Shell Script. I got an exercise from my friend. I know how to make this happen in C, but I'm not familiar with Shell Script. Hope I can get some help from all of you.
I want to write a bash script to comment code blocks in a bash source file. What I mean comment is '#', I... (1 Reply)
Hello,
I want to parse the contents of a multiline html tag
ex:
<html>
<body>
<p>some other text</p>
<div>
<p class="margin-bottom-0">
text1
<br>
text2
<br>
<br>
text3
</p>
</div>
</body> (15 Replies)
Discussion started by: SorcRR
15 Replies
LEARN ABOUT CENTOS
trace-cmd-extract
TRACE-CMD-EXTRACT(1)TRACE-CMD-EXTRACT(1)NAME
trace-cmd-extract - extract out the data from the Ftrace Linux tracer.
SYNOPSIS
trace-cmd extract [OPTIONS]
DESCRIPTION
The trace-cmd(1) extract is usually used after trace-cmd-start(1) and trace-cmd-stop(1). It can be used after the Ftrace tracer has been
started manually through the Ftrace pseudo file system.
The extract command creates a trace.dat file that can be used by trace-cmd-report(1) to read from. It reads the kernel internal ring buffer
to produce the trace.dat file.
OPTIONS -p plugin
Although extract does not start any traces, some of the plugins require just reading the output in ASCII format. These are the latency
tracers, since the latency tracers have a separate internal buffer. The plugin option is therefore only necessary for the wakeup,
wakeup-rt, irqsoff, preemptoff and preemptirqsoff plugins.
With out this option, the extract command will extract from the internal
Ftrace buffers.
-O option
If a latency tracer is being extracted, and the -p option is used, then there are some Ftrace options that can change the format. This
will update those options before extracting. To see the list of options see trace-cmd-list. To enable an option, write its name, to
disable the option append the characters no to it. For example: noprint-parent will disable the print-parent option that prints the
parent function in printing a function event.
-o outputfile
By default, the extract command will create a trace.dat file. This option will change where the file is written to.
SEE ALSO trace-cmd(1), trace-cmd-record(1), trace-cmd-report(1), trace-cmd-start(1), trace-cmd-stop(1), trace-cmd-reset(1), trace-cmd-split(1),
trace-cmd-list(1), trace-cmd-listen(1)AUTHOR
Written by Steven Rostedt, <rostedt@goodmis.org[1]>
RESOURCES
git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/trace-cmd.git
COPYING
Copyright (C) 2010 Red Hat, Inc. Free use of this software is granted under the terms of the GNU Public License (GPL).
NOTES
1. rostedt@goodmis.org
mailto:rostedt@goodmis.org
06/11/2014 TRACE-CMD-EXTRACT(1)