Well too many things in one go.
Lets split them.
Ragarding:
You need not call sed again and again.
As an example, the code can be as follows:
In your case you don't need the "/G". Without it, the command will run faster.
Ok, I'll give it a try without "-e" and "/g"... and for the duplicate replacements, already scraped them
---------- Post updated at 01:51 PM ---------- Previous update was at 01:43 PM ----------
tried... worked just fine... on this particular case, speed was not really an issue as the script ran for about 10 seconds or less (for a 950 records source file).
Hi,
I have a configuration file(which has values) and a template file(where the values are dummied)
Configuration file (a.txt)
--------------------
var1=1521
var2=172.10.10.10
var3=emp
.
.
.
var15=hhhhhhh
Template file (b.txt)
--------------------
The host name is $var2.
The... (5 Replies)
Hi All,
I'm new to the forum and not a programmer, but I'm writing a bash script to preprocess definitions of technical terms by inserting hyperlinks pointing to other pages in the glossary before the pages are posted to our server, using a standard naming convention for the pages. The... (3 Replies)
Hi fellas,
I have two files such as:
File 1
interacao,AspAsp,AspCys,CysAsp,CysCys,classe
File 2
interacao,AspAsp,CysAsp,AspCys,CysCys,classe
beta_alfa, DA, CA, DD, CD,ppi
Thus, I want to make a File 3 using the File 1 as model:
e.g.
File 3... (2 Replies)
Hi all,
I have a template form to fill in for quite a number of files and I want to automate the filling-in process. the concept seemed to be simple but i cant get it work. the template form is a text file containing the information below:
File Name:
Date Created:
Contents:
I need to... (4 Replies)
Dear All,
I have a template xml file like below.
....Some---Header.......
<SignalPreference>
...
<SignalName>STRING</SignalName>
...
</SignalPreference>
......Some formatting text.......
<SignalPreference>
.........
... (3 Replies)
Hi,
I have hit a bit of a brick wall.:confused:
need the following code edited:
echo "<?xml version=\"1.0\"?><dailyBalance_ROWSET>" > ${DataDir}/${extract_script}${ApplicationDate}.${Suffix}
RunSQL ${extract_script} ${ActionFlag}
echo "</dailyBalance_ROWSET>" >>... (2 Replies)
Hi I have a CommonTemplateStop.template file . Inside the file i need to replace the variables DepName and CompInsName with the values(Trade and TradeIns) specified in the script. I have written the below .sh script in linux server which will read the .template file and has to replace the 2... (8 Replies)
Hi,
I have a .csv file that contains a variety of fields for 60 clients: USERNAME, PASSWORD, and COMMENTS. I have a template file which contains a great deal of data for each client and has the fields USERNAME, PASSWORD, and COMMENTS that has to be filled with the values of USERNAME,... (1 Reply)
I am preparing a morphological grammar of Marathi to be placed in open-source.
I have two files.
The first file called Adverbs contains a whole list of words, one word per line
A sample is given below:
आधी
इतक
इतपत
उलट
एवढ
ऐवजी
कड
कडनं
कडल
कडील
कडून
कडे
करता
करिता
खाल (2 Replies)
I have a source csv file consists of first field as variable name, and the rest are site-specific information (converted from excel file, where site -specific values in columns). I am trying to create a file for every site using a template and replace the multiple variables with values from the... (3 Replies)
Discussion started by: apalex
3 Replies
LEARN ABOUT DEBIAN
prophet::cli::texteditorcommand
Prophet::CLI::TextEditorCommand(3pm) User Contributed Perl Documentation Prophet::CLI::TextEditorCommand(3pm)
separator_pattern
A pattern that will match on lines that count as section separators in record templates. Separator string text is remembered as $1.
comment_pattern
A pattern that will match on lines that count as comments in record templates.
build_separator $text
Takes a string and returns it in separator form. A separator is a line of text that denotes a section in a template.
build_template_section header => '=== foo ===' [, data => 'bar']
Takes a header text string and (optionally) a data string and formats them into a template section.
try_to_edit template => $tmpl [, record => $record ]
Edits the given template if possible. Passes the updated template in to process_template (errors in the updated template must be handled
there, not here).
handle_template_errors error => 'foo', template_ref => $tmpl_str, bad_template => 'bar', rtype => 'ticket'
Should be called in "process_template" if errors (usually validation ones) occur while processing a record template. This method prompts
the user to re-edit and updates the template given by "template_ref" to contain the bad template (given by the arg "bad_template" prefixed
with the error messages given in the "error" arg. If an errors section already exists in the template, it is replaced with an errors
section containing the new errors.
If the template you are editing is not section-based, you can override what will be prepended to the template by passing in the
"errors_pattern" argument, and passing in "old_errors" if a template errors out repeatedly and there are old errors in the template that
need to be replaced.
Other arguments are: "rtype": the type of the record being edited. All arguments except overrides ("errors_pattern" and "old_errors" are
required.
calling code must implement
run process_template
perl v5.10.1 2009-08-17 Prophet::CLI::TextEditorCommand(3pm)