Hi all,
I need to insert new text and change existing text in a file. For that I used the below line in the command line and got the expected output.
sed '$a\
hi...
' shell > shell1
But I face problem when using the same in script. It is throwing the error as,
sed: command garbled:... (4 Replies)
I can't seem to get sed to allow me to insert text in the first line of an empty file. I have a file.txt that is a 0 byte file. I want sed to insert " fooBar" onto the first line. I've tried a few options and nothing seems to work. They work just fine if there's text in the file tho. Help? (4 Replies)
sed '1r file.txt' <source.txt >desti.txt
This example will insert 'file.txt' between line 1 and 2 of source.txt.
sed '0r file.txt' <source.txt >desti.txt
gives an error message.
Does anyone know how 'sed' can insert 'file.txt' before the first line of source.txt? (18 Replies)
Greetings all,
I am trying to match a string, and after that insert a few lines above that match.
The string is "Version 1.0.0". I need to insert a few lines ONLY above the first match (there are many Version numbers in the file). The rest of the matches must be ignored. The lines I need to... (2 Replies)
Hi!
Considering below text, how would I use sed to insert text right below the v0005-line, using the SEPARATOR-line as a pattern to search for, so two lines above the separator? I can do it right above the separator, but not 2 lines...
# v0004 - Some text
# v0005 - More text
#... (5 Replies)
Have a file which has the create statement like below
create table emp
( empno integer,
empname char(50))
primary index(empno);
i need to find a string starting with create and ends with semi-colon ;. if so insert the below statement before create statement
rename table emp to emp_rename;... (2 Replies)
Having a little trouble getting this to work just right.
I have xml files that i want to split some data.
I have 2 <name> tags within the file
I would like to take only the first tag and split the data.
tag example.
From this.
TAB<Name>smith, john</Name>
to
TAB<Name>smith,... (8 Replies)
hi all,
trying this using shell/bash with sed/awk/grep
I have two files, one containing one column, the other containing multiple columns (comma delimited).
file1.txt
abc12345
def12345
ghi54321
...
file2.txt
abc1,text1,texta
abc,text2,textb
def123,text3,textc
gh,text4,textd... (6 Replies)
Discussion started by: shogun1970
6 Replies
LEARN ABOUT DEBIAN
cobertura-instrument
COBERTURA-INSTRUMENT(1) General Commands Manual COBERTURA-INSTRUMENT(1)NAME
cobertura-instrument -- add coverage instrumentation to existing classes
SYNOPSIS
cobertura-instrument [--basedir dir] [--datafile file] [--destination dir] [--ignore regex] classes [...]
DESCRIPTION
cobertura-instrument inserts instrumentation instructions directly into your compiled Java classes. When these instructions are encountered
by the Java Virtual Machine, the inserted code increments various counters so that it is possible to tell which instructions have been
encountered and which have not.
OPTIONS
Classes may be specified individually, or as a directory tree containing multiple classes.
--basedir dir
Specify the base directory containing the classes you want to instrument. This command line parameter should appear before any
classes. If you are instrumenting classes in different directories, you should specify multiple basedirs.
--datafile file
Specify the name of the file to use for storing the metadata about your classes. This is a single file containing serialized Java
classes. It contains information about the names of classes in your project, their method names, line numbers, etc. It will be
updated as your tests are run, and will be referenced by the Cobertura reporting command. Default value: "./cobertura.ser".
--destination dir
Specify the output directory for the instrumented classes. If no destination directory is specified, then the uninstrumented
classes will be overwritten with their instrumented counterparts.
--ignore regex
Specify a regular expression to filter out certain lines of your source code. This is useful for ignoring logging statements, for
example. You can have as many <ignore/> statements as you want. By default no files are ignored.
SEE ALSO junit(1), cobertura-check(1), cobertura-report(1), cobertura-merge(1).
AUTHOR
This manual page was written by Miguel Landaeta <miguel@miguel.cc> for the Debian system (but may be used by others). Permission is
granted to copy, distribute and/or modify this document under the terms of the terms of GNU General Public License, Version 2 or any later
version published by the Free Software Foundation.
On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL.
COBERTURA-INSTRUMENT(1)