What is the command to count lines in a files, but ignore blank lines and commented lines?
I have a file with 4 sections in it, and I want each section to be counted, not including the blank lines and comments... and then totalled at the end.
Here is an example of what I would like my... (6 Replies)
I've written a script to count the total size of SAN storage LUNs, and also display the LUN sizes.
From server to server, the LUNs sizes differ.
What I want to do is count the occurances as they occur and change.
These are the LUN sizes:
49.95
49.95
49.95
49.95
49.95
49.95
49.95
49.95... (2 Replies)
I need to count the number of occurrences of a pattern, say 'key', between each occurrence of a different pattern, say 'lu'.
Here's a portion of the text I'm trying to parse:
lu S1234L_149_m1_vg.6, part-att 1, vdp-att 1 p-reserver IID 0xdb
registrations:
key 4156 4353 0000 0000
... (3 Replies)
Hi ,
I have a file which has multiple rows of data, i want to match the pattern for two columns and if both conditions satisfied i have to add the counter by 1 and finally print the count value. How to proceed...
I tried in this way...
awk -F, 'BEGIN {cnt = 0} {if $6 == "VLY278" &&... (6 Replies)
I am trying to search a file for a patterns ERR- in a file and return a count for each of the error reported
Input file is a free flowing file without any format
example of output
ERR-00001=5
....
ERR-01010=10
.....
ERR-99999=10 (4 Replies)
Guys -
Need your ideas on a section of code to finish something up. To make a long story short, I'm parsing a print output file that goes to pre-printed forms. I'm intercepting it, parsing it, formatting it, cutting it up into individual pages, grabbing the text I want in zones, building an... (3 Replies)
The intended result should be :
PDF converters
'empty line'
gpdftext and pdftotext?xml version="1.0"?>
xml:space="preserve"><note-content version="0.1" xmlns:/tomboy/link" xmlns:size="http://beatniksoftware.com/tomboy/size">PDF converters
gpdftext and pdftotext</note-content>... (9 Replies)
I have a file like below.
2018.07.01, Sunday
09:27 some text 123456789 0 21 0.06 0.07 0.00
2018.07.02, Monday
09:31 some text 123456789 1 41 0.26 0.32 0.00
09:39 some text 456789012 1 0.07 0.09 0.09
09:45 some text 932469494 1 55 0.29 0.36 0.00
16:49 some text 123456789 0 48 0.12 0.15 0.00... (9 Replies)
Discussion started by: father_7
9 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)