Hello everyone... please help if you can -- I'm stumped. Making this work will save me hours of manual labor:
I need to search file2 for pattern in file1. If pattern found append file2 line to file3. If pattern not found append a blank line to file3.
file1 contents example:
123
456
789... (6 Replies)
I need your help,
I want to add a text every 2nd line and also a blank line after 3 line
(In the output 2nd line is "changetype: modify" and every 4th line is blank line)
Input file format
dn: abc
orclsourceobjectdn: abcd
dn: bcd
orclsourceobjectdn: bcda
dn: cba
orclsourceobjectdn:... (7 Replies)
i need to compare three files in unix
a.txt b.txt c.txt
1 2 1
2 5 3
4 6 5
5 6
6
i need to insert a blank line in the file if i don't find a match
and put the items at the same column if found a match
The items in the files... (4 Replies)
Hi all,
I've googling around forum regarding my prob, the nearest would same as thread tittled Insert blank line if grep not found, but she/he did not mention the solution, so I would like to request your help
I've this task, to search in file2 based on pattern in file1 and output it to... (4 Replies)
Hi,
I have a file with no blank line anywhere
Its a conf file, The lines between and starts with "#" should be sort out with the first three characters(characters are between (a-z)). and insert a blank space in between the uniq lines. For clear understanding ,pls find the below input file... (11 Replies)
how can i insert a string sush as "###" instead of blank lines in a file?
i try this code but it doesn't work!
awk 'NF<1 {$1=="###" ; print$0}' in_file > out_file (13 Replies)
Hello,
I have a file that I want to be able to insert a new line before every instance of a regex. I can get it to do this for each line that contains the regex, but not for each instance.
Contents of infile:
Test this 1...
Test this 2...
Test this 3... Test this 4... Test this... (2 Replies)
Dear all
I want to search special string in file and then print next all line in one line until blank lines come. Help me plz for same. My input file and desire op file is as under.
i/p file:
A1/EXT "BSCABD1_21233G1" 757 130823 1157
RADIO X-CEIVER ADMINISTRATION
BTS EXTERNAL FAULT
... (7 Replies)
Hello.
I have a config file (/etc/my_config_file) which may content :
#
# port for HTTP (descriptions, SOAP, media transfer) traffic
port=8200
# network interfaces to serve, comma delimited
network_interface=eth0
# set this to the directory you want scanned.
# * if have multiple... (6 Replies)
Discussion started by: jcdole
6 Replies
LEARN ABOUT DEBIAN
erubis
ERUBIS(1) User Commands ERUBIS(1)NAME
erubis - eRuby style template engine for multiple languages
SYNOPSIS
erubis [..options..] [file ...]
DESCRIPTION
Embedded templating engine for multiple languages. Erubis will take a template file as input and output code to convey that data in the
language specified. The following output languages are supported:
* Ruby
* PHP
* C
* Java
* Scheme
* Perl
* JavaScript
OPTIONS -h, --help
help
-v version
-x show converted code
-X show converted code, only ruby code and no text part
-N numbering: add line numbers (for '-x/-X')
-U unique: compress empty lines to a line (for '-x/-X')
-C compact: remove empty lines (for '-x/-X')
-b body only: no preamble nor postamble (for '-x/-X')
-z syntax checking
-e escape (equal to '--E Escape')
-p pattern
embedded pattern (default '<% %>')
-l lang
convert but no execute (ruby/php/c/java/scheme/perl/js)
-E e1,e2,...
enhancer names (Escape, PercentLine, BiPattern, ...)
-I path
library include path
-K kanji
kanji code (euc/sjis/utf8) (default none)
-c context
context data string (yaml inline style or ruby code)
-f datafile
context data file ('*.yaml', '*.yml', or '*.rb')
-T don't expand tab characters in YAML file
-S convert mapping key from string to symbol in YAML file
-B invoke 'result(binding)' instead of 'evaluate(context)'
--pi=name
parse '<?name ... ?>' instead of '<% ... %>'
supported properties:
* (common)
--escapefunc=nil
: escape function name
--pattern="<% %>"
: embed pattern
--trim=true
: trim spaces around <% ... %>
--preamble=nil
: preamble (no preamble when false)
--postamble=nil
: postamble (no postamble when false)
--escape=nil
: escape expression or not in default
* (basic) * (pi)
--pi="rb"
: PI (Processing Instrunctions) name
--embchar="@"
: char for embedded expression pattern('@{...}@')
* ruby * php * c
--indent=""
: indent spaces (ex. ' ')
--out="stdout"
: output file pointer name
* java
--indent=""
: indent spaces (ex. ' ')
--buf="_buf"
: output buffer name
--bufclass="StringBuffer" : output buffer class (ex. 'StringBuilder')
* scheme
--func="_add"
: function name (ex. 'display')
* perl
--func="print"
: function name
* javascript
--docwrite=true
: use 'document.write()' when true
EXAMPLES
Run 'erubis -l php example.ephp' to convert the embedded document to php code.
example.ephp:
<?xml version="1.0"?>
<html>
<body>
<p>Hello <%= $user %>!</p>
<table>
<tbody>
<% $i = 0; %>
<% foreach ($list as $item) { %>
<% $i++; %>
<tr bgcolor="<%= $i % 2 == 0 ? '#FFCCCC' : '#CCCCFF' %>">
<td><%= $i %></td>
<td><%== $item %></td>
</tr>
<% } %>
</tbody>
</table>
</body>
</html>
SEE ALSO
http://rubyforge.org/projects/erubis/
erubis 2.6.2 January 2009 ERUBIS(1)