1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294
|
From: Generated from INFO
Subject: The Makefile generates an updated bbe.html. These are the mods.
---
doc/bbe.html | 94 +++++++++++++++++++++++++++++------------------------------
1 file changed, 47 insertions(+), 47 deletions(-)
--- a/doc/bbe.html
+++ b/doc/bbe.html
@@ -3,7 +3,7 @@
<title>bbe - binary block editor</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="bbe - binary block editor">
-<meta name="generator" content="makeinfo 4.8">
+<meta name="generator" content="makeinfo 4.13">
<link title="Top" rel="top" href="#Top">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
@@ -40,8 +40,8 @@
<body>
<h1 class="settitle">bbe - binary block editor</h1>
<div class="node">
-<p><hr>
<a name="Top"></a>
+<p><hr>
Next: <a rel="next" accesskey="n" href="#Overview">Overview</a>,
Previous: <a rel="previous" accesskey="p" href="#dir">(dir)</a>,
Up: <a rel="up" accesskey="u" href="#dir">(dir)</a>
@@ -59,12 +59,12 @@
this manual provided the copyright notice and this permission notice
are preserved on all copies.
- <p>Permission is granted to copy and distribute modified versions of this
+ <p>Permission is granted to copy and distribute modified versions of this
manual under the conditions for verbatim copying, provided that the entire
resulting derived work is distributed under the terms of a permission
notice identical to this one.
- <p>Permission is granted to copy and distribute translations of this manual
+ <p>Permission is granted to copy and distribute translations of this manual
into another language, under the above conditions for modified versions.
</blockquote>
@@ -79,8 +79,8 @@
</ul>
<div class="node">
-<p><hr>
<a name="Overview"></a>
+<p><hr>
Next: <a rel="next" accesskey="n" href="#Samples">Samples</a>,
Previous: <a rel="previous" accesskey="p" href="#Top">Top</a>,
Up: <a rel="up" accesskey="u" href="#Top">Top</a>
@@ -97,8 +97,8 @@
<p><samp><span class="command">bbe</span></samp> contains also grep-like features, like printing the filename, offset and block number.
<div class="node">
-<p><hr>
<a name="Samples"></a>
+<p><hr>
Next: <a rel="next" accesskey="n" href="#Invoking-bbe">Invoking bbe</a>,
Previous: <a rel="previous" accesskey="p" href="#Overview">Overview</a>,
Up: <a rel="up" accesskey="u" href="#Top">Top</a>
@@ -111,28 +111,28 @@
Few examples of running <samp><span class="command">bbe</span></samp>:
<dl>
-<dt>`<samp><span class="samp">bbe -b "/\x80\x50\x0e/:12" -e "d 0 3" -e "c BCD ASC" -e "A \x0a" -e "w /tmp/numbers" -o /dev/null /tmp/bdata</span></samp>'<dd>Task here is to extract BCD coded numbers from the file <samp><span class="file">/tmp/bdata</span></samp> and write them
+<dt>‘<samp><span class="samp">bbe -b "/\x80\x50\x0e/:12" -e "d 0 3" -e "c BCD ASC" -e "A \x0a" -e "w /tmp/numbers" -o /dev/null /tmp/bdata</span></samp>’<dd>Task here is to extract BCD coded numbers from the file <samp><span class="file">/tmp/bdata</span></samp> and write them
in ascii format with newline to file <samp><span class="file">/tmp/numbers</span></samp>.
12 bytes long blocks containing the BCD-numbers start with three byte sequence of
-values `<samp><span class="samp">0x80</span></samp>', `<samp><span class="samp">0x50</span></samp>' and `<samp><span class="samp">0x0e</span></samp>'. First three bytes (the block start sequence)
-are removed (`<samp><span class="samp">d 0 3</span></samp>') rest of the block is transformed from BCD to Ascii (`<samp><span class="samp">c BCD ASC</span></samp>') and a newline character is
-appended at the end of the block (`<samp><span class="samp">A \x0a</span></samp>').
-All transformed blocks are written to <samp><span class="file">/tmp/numbers</span></samp> (`<samp><span class="samp">w /tmp/numbers</span></samp>'). Nothing is written to
-the output (`<samp><span class="samp">-o /dev/null</span></samp>').
+values ‘<samp><span class="samp">0x80</span></samp>’, ‘<samp><span class="samp">0x50</span></samp>’ and ‘<samp><span class="samp">0x0e</span></samp>’. First three bytes (the block start sequence)
+are removed (‘<samp><span class="samp">d 0 3</span></samp>’) rest of the block is transformed from BCD to Ascii (‘<samp><span class="samp">c BCD ASC</span></samp>’) and a newline character is
+appended at the end of the block (‘<samp><span class="samp">A \x0a</span></samp>’).
+All transformed blocks are written to <samp><span class="file">/tmp/numbers</span></samp> (‘<samp><span class="samp">w /tmp/numbers</span></samp>’). Nothing is written to
+the output (‘<samp><span class="samp">-o /dev/null</span></samp>’).
<br>
- <br><dt>`<samp><span class="samp">bbe -b ":525" -e "i 524 \x0a" -o /tmp/data_with_nl /tmp/data</span></samp>'<dd>A newline is added after every 525'th byte of the file <samp><span class="file">/tmp/data</span></samp>. Data with newlines is written to <samp><span class="file">/tmp/data_with_nl</span></samp>.
+ <br><dt>‘<samp><span class="samp">bbe -b ":525" -e "i 524 \x0a" -o /tmp/data_with_nl /tmp/data</span></samp>’<dd>A newline is added after every 525'th byte of the file <samp><span class="file">/tmp/data</span></samp>. Data with newlines is written to <samp><span class="file">/tmp/data_with_nl</span></samp>.
<br>
- <br><dt>`<samp><span class="samp">bbe -b ":526" -e "d 525 1" -o /tmp/data /tmp/data_with_nl</span></samp>'<dd>Every 526'th byte (inserted newline in previous example) is removed from the file <samp><span class="file">/tmp/data_with_nl</span></samp>. Data without newlines is written to <samp><span class="file">/tmp/data</span></samp>.
+ <br><dt>‘<samp><span class="samp">bbe -b ":526" -e "d 525 1" -o /tmp/data /tmp/data_with_nl</span></samp>’<dd>Every 526'th byte (inserted newline in previous example) is removed from the file <samp><span class="file">/tmp/data_with_nl</span></samp>. Data without newlines is written to <samp><span class="file">/tmp/data</span></samp>.
<br>
- <br><dt>`<samp><span class="samp">bbe -e "s/\x0d\x0a/\x0a/"</span></samp>'<dd>Same effect as has command <samp><span class="command">dos2unix</span></samp>.
+ <br><dt>‘<samp><span class="samp">bbe -e "s/\x0d\x0a/\x0a/"</span></samp>’<dd>Same effect as has command <samp><span class="command">dos2unix</span></samp>.
</dl>
<div class="node">
-<p><hr>
<a name="Invoking-bbe"></a>
+<p><hr>
Next: <a rel="next" accesskey="n" href="#bbe-programs">bbe programs</a>,
Previous: <a rel="previous" accesskey="p" href="#Samples">Samples</a>,
Up: <a rel="up" accesskey="u" href="#Top">Top</a>
@@ -155,8 +155,8 @@
</ul>
<div class="node">
-<p><hr>
<a name="Invocation"></a>
+<p><hr>
Next: <a rel="next" accesskey="n" href="#Block">Block</a>,
Up: <a rel="up" accesskey="u" href="#Invoking-bbe">Invoking bbe</a>
@@ -172,7 +172,7 @@
<p><code>bbe</code> supports the following options:
<!-- Formatting copied from the Texinfo 4.0 manual. -->
-<dl>
+ <dl>
<dt><code>-b </code><var>BLOCK</var><dt><code>--block=</code><var>BLOCK</var><dd>Block definition.
<br><dt><code>-e </code><var>COMMAND</var><dt><code>--expression=</code><var>COMMAND</var><dd>Add command(s) to the commands to be executed. Commands must be separated by semicolon.
@@ -192,8 +192,8 @@
<p>All remaining options are names of input files, if no input files are specified or <code>-</code> is given, then the standard input is read.
<div class="node">
-<p><hr>
<a name="Block"></a>
+<p><hr>
Next: <a rel="next" accesskey="n" href="#Commands">Commands</a>,
Previous: <a rel="previous" accesskey="p" href="#Invocation">Invocation</a>,
Up: <a rel="up" accesskey="u" href="#Invoking-bbe">Invoking bbe</a>
@@ -268,8 +268,8 @@
</dl>
<div class="node">
-<p><hr>
<a name="Commands"></a>
+<p><hr>
Next: <a rel="next" accesskey="n" href="#Limits">Limits</a>,
Previous: <a rel="previous" accesskey="p" href="#Block">Block</a>,
Up: <a rel="up" accesskey="u" href="#Invoking-bbe">Invoking bbe</a>
@@ -316,9 +316,9 @@
<br><dt><code>B </code><var>f</var><dd>Before block contents the current block number and colon is printed in format specified by <var>f</var>.
Block numbering starts at one. <var>f</var> can have one of the sames codes as <code>F</code>-command.
- <br><dt><code>> <samp></code><span class="file">file</span><code></samp></code><dd>Before printing a block, the contents of file <samp><span class="file">file</span></samp> is printed.
+ <br><dt><code>> </code><samp><span class="file">file</span></samp><dd>Before printing a block, the contents of file <samp><span class="file">file</span></samp> is printed.
- <br><dt><code>< <samp></code><span class="file">file</span><code></samp></code><dd>After printing a block, the contents of file <samp><span class="file">file</span></samp> is printed.
+ <br><dt><code>< </code><samp><span class="file">file</span></samp><dd>After printing a block, the contents of file <samp><span class="file">file</span></samp> is printed.
</dl>
<h4 class="subheading">Byte commands are:</h4>
@@ -368,7 +368,7 @@
<br><dt><code>s/</code><var>search</var><code>/</code><var>replace</var><code>/</code><dd>All occurences of <var>search</var> are replaced by <var>replace</var>. <var>replace</var> can be empty. Separator <code>/</code> can be replaced by any
character not present in <var>search</var> or <var>replace</var>.
- <br><dt><code>w <samp></code><span class="file">file</span><code></samp></code><dd>Contents of blocks are written to file <samp><span class="file">file</span></samp>. <strong>Note</strong>: Data inserted by commands <code>A</code>, <code>I</code>,
+ <br><dt><code>w </code><samp><span class="file">file</span></samp><dd>Contents of blocks are written to file <samp><span class="file">file</span></samp>. <strong>Note</strong>: Data inserted by commands <code>A</code>, <code>I</code>,
<code>></code> and <code><</code>
are written to file <samp><span class="file">file</span></samp> and <code>j</code> and <code>l</code> commands have no effect on <code>w</code>-commands. Zero size files are not preserved.<br>
Filename can contain format string <code>%B</code> or <code>%nB</code>, these format strings are replace by current block number (starting from one), causing every block to have it's own file.
@@ -389,8 +389,8 @@
</dl>
<div class="node">
-<p><hr>
<a name="Limits"></a>
+<p><hr>
Previous: <a rel="previous" accesskey="p" href="#Commands">Commands</a>,
Up: <a rel="up" accesskey="u" href="#Invoking-bbe">Invoking bbe</a>
@@ -409,8 +409,8 @@
</dl>
<div class="node">
-<p><hr>
<a name="bbe-programs"></a>
+<p><hr>
Next: <a rel="next" accesskey="n" href="#Problems">Problems</a>,
Previous: <a rel="previous" accesskey="p" href="#Invoking-bbe">Invoking bbe</a>,
Up: <a rel="up" accesskey="u" href="#Top">Top</a>
@@ -420,7 +420,7 @@
<h2 class="chapter">4 How <samp><span class="command">bbe</span></samp> works</h2>
<p><samp><span class="command">bbe</span></samp> scans the input stream just once, so the last block may differ from the block definition, because <samp><span class="command">bbe</span></samp> doesn't
-'peek' the end of the input stream. Last block may be shorter than defined, e.g. if block is defined as `<samp><span class="samp">/string/:128</span></samp>'
+'peek' the end of the input stream. Last block may be shorter than defined, e.g. if block is defined as ‘<samp><span class="samp">/string/:128</span></samp>’
and if the end of input stream is found before 128'th byte of the last block is reached, the last block remains shorter.
<h4 class="subheading">Basic execution cycle:</h4>
@@ -443,15 +443,15 @@
<h4 class="subheading">Few examples:</h4>
<dl>
-<dt>`<samp><span class="samp">echo "The quick brown fox jumps over a lazy dog" | bbe -b "/The/:21" -e "j 4" -e "s/ /X/"</span></samp>'<dd>Output is
+<dt>‘<samp><span class="samp">echo "The quick brown fox jumps over a lazy dog" | bbe -b "/The/:21" -e "j 4" -e "s/ /X/"</span></samp>’<dd>Output is
<pre class="example"> The quickXbrownXfoxXjumps over a lazy dog
- </pre>
+</pre>
<p>The only block in this is
<pre class="example"> The quick brown fox j
- </pre>
+</pre>
<p>All spaces in the block are converted to X's, before conversion first 4 bytes are skipped.<br>
- <br><dt>`<samp><span class="samp">echo "The quick brown fox jumps over a lazy dog" | bbe -b ":/ /" -e "J 1" -e "A \x0a"</span></samp>'<dd>Output is:
+ <br><dt>‘<samp><span class="samp">echo "The quick brown fox jumps over a lazy dog" | bbe -b ":/ /" -e "J 1" -e "A \x0a"</span></samp>’<dd>Output is:
<pre class="example"> The quick
brown
fox
@@ -461,57 +461,57 @@
lazy
dog
- </pre>
+</pre>
<p>All blocks end at space, a newline character is inserted after every block except the first block.<br>
- <br><dt>`<samp><span class="samp">echo "The quick brown fox jumps over a lazy dog" | bbe -e "r 4 fast\x20" -e "s/f/c/"</span></samp>'<dd>Output is:
+ <br><dt>‘<samp><span class="samp">echo "The quick brown fox jumps over a lazy dog" | bbe -e "r 4 fast\x20" -e "s/f/c/"</span></samp>’<dd>Output is:
<pre class="example"> The cast brown cox jumps over a lazy dog
- </pre>
+</pre>
<p>Also the <code>f</code> in <code>fast</code> is converted to <code>c</code>.<br>
- <br><dt>`<samp><span class="samp">echo "1234567890" | bbe -b ":1" -e "L 9" -e "A -"</span></samp>'<dd>Output is
+ <br><dt>‘<samp><span class="samp">echo "1234567890" | bbe -b ":1" -e "L 9" -e "A -"</span></samp>’<dd>Output is
<pre class="example"> 1-2-3-4-5-6-7-8-9-0
- </pre>
+</pre>
<p>Hyphen is inserted after every 1 byte long block,but not after 9'th block.<br>
- <br><dt>`<samp><span class="samp">bbe -s -b "/First line/:/Last line/" /tmp/text</span></samp>'<dd>Print lines between sentences `<samp><span class="samp">First line</span></samp>' and `<samp><span class="samp">Last line</span></samp>'.<br>
+ <br><dt>‘<samp><span class="samp">bbe -s -b "/First line/:/Last line/" /tmp/text</span></samp>’<dd>Print lines between sentences ‘<samp><span class="samp">First line</span></samp>’ and ‘<samp><span class="samp">Last line</span></samp>’.<br>
- <br><dt>`<samp><span class="samp">bbe -s -b "%<a %:%</a>%" -e "s/\x0a/ /" -e "A \n" ./index.html</span></samp>'<dd>Extract all links from <samp><span class="file">./index.html</span></samp>. To get one link per line,
+ <br><dt>‘<samp><span class="samp">bbe -s -b "%<a %:%</a>%" -e "s/\x0a/ /" -e "A \n" ./index.html</span></samp>’<dd>Extract all links from <samp><span class="file">./index.html</span></samp>. To get one link per line,
all newlines are converted to spaces and newline is added after every link.<br>
- <br><dt>`<samp><span class="samp">bbe -b "/\x5f\x28\x02/:10" -s -e "F d" -e "p h" -e "A \n" ./bindata</span></samp>'<dd>10 bytes long sequences starting with values <code>x5f</code> <code>x28</code> and <code>x02</code> are printed as hex values.
+ <br><dt>‘<samp><span class="samp">bbe -b "/\x5f\x28\x02/:10" -s -e "F d" -e "p h" -e "A \n" ./bindata</span></samp>’<dd>10 bytes long sequences starting with values <code>x5f</code> <code>x28</code> and <code>x02</code> are printed as hex values.
Also the file offset is printed before each sequence and new line is added after every sequence.
Example output:
<pre class="example"> 52688:x5f x28 x02 x32 x36 x5f x81 x64 x01 x93
68898:x5f x28 x02 x39 x46 x5f x81 x64 x41 x05
69194:x5f x28 x02 x42 x36 x5f x81 x64 x41 x05
- </pre>
+</pre>
<p><br>
- <br><dt>`<samp><span class="samp">bbe -b "/Linux/:5" -s -e "N;D;A \x0a" /bin/* | uniq</span></samp>'<dd>Print the file names of those programs in /bin directory which contains word `<samp><span class="samp">Linux</span></samp>'.
+ <br><dt>‘<samp><span class="samp">bbe -b "/Linux/:5" -s -e "N;D;A \x0a" /bin/* | uniq</span></samp>’<dd>Print the file names of those programs in /bin directory which contains word ‘<samp><span class="samp">Linux</span></samp>’.
Example output:
<pre class="example"> /bin/loadkeys:
/bin/mkbimage:
/bin/ps:
/bin/uname:
- </pre>
+</pre>
<p><br>
- <br><dt>`<samp><span class="samp">bbe -b "/\x5f\x81\x18\x06/:10" -s -e "B d;d 0 4;c BCD ASC;A \n" ./bindata</span></samp>'<dd>Print BCD numbers and their block numbers in ascii format. Numbers start with sequence <code>x5f</code> <code>x81</code> <code>x18</code> <code>x06</code>.
+ <br><dt>‘<samp><span class="samp">bbe -b "/\x5f\x81\x18\x06/:10" -s -e "B d;d 0 4;c BCD ASC;A \n" ./bindata</span></samp>’<dd>Print BCD numbers and their block numbers in ascii format. Numbers start with sequence <code>x5f</code> <code>x81</code> <code>x18</code> <code>x06</code>.
The start sequence is not printed.<br>
- <br><dt>`<samp><span class="samp">bbe -b "/\x5f/:2" -e "j 1;& \xf0" -o newdata bindata</span></samp>'<dd>The least significant nybble of bytes after <code>x5f</code> is cleared.<br>
+ <br><dt>‘<samp><span class="samp">bbe -b "/\x5f/:2" -e "j 1;& \xf0" -o newdata bindata</span></samp>’<dd>The least significant nybble of bytes after <code>x5f</code> is cleared.<br>
- <br><dt>`<samp><span class="samp">bbe -b "/\xff\xd8\xff/:/\xff\xd9/" -s -e "w pic%02B.jpg" -o /dev/null manual.pdf</span></samp>'<dd>Extract jpg-images from pdf-file to separate jpg-files (assuming that the jpg start/stop sequences
+ <br><dt>‘<samp><span class="samp">bbe -b "/\xff\xd8\xff/:/\xff\xd9/" -s -e "w pic%02B.jpg" -o /dev/null manual.pdf</span></samp>’<dd>Extract jpg-images from pdf-file to separate jpg-files (assuming that the jpg start/stop sequences
does not appear in other context than jpg-images).
Files will be named as <samp><span class="file">pic01.jpg</span></samp>, <samp><span class="file">pic02.jpg</span></samp>, <samp><span class="file">pic03.jpg</span></samp>,<small class="dots">...</small> <br>
- <br><dt>`<samp><span class="samp">bbe -b "_<body>_:_</body>_" -s -o temp nicebody.html</span></samp>'<dt>`<samp><span class="samp">bbe -b "_<body>_:_</body>_" -e "D;< temp" -o tmpindex.html index.html</span></samp>'<dt>`<samp><span class="samp">mv tmpindex.html index.html</span></samp>'<dd>The body part of the html-document <samp><span class="file">index.html</span></samp> is replaced by the body of the document <samp><span class="file">nicebody.html</span></samp>.
+ <br><dt>‘<samp><span class="samp">bbe -b "_<body>_:_</body>_" -s -o temp nicebody.html</span></samp>’<dt>‘<samp><span class="samp">bbe -b "_<body>_:_</body>_" -e "D;< temp" -o tmpindex.html index.html</span></samp>’<dt>‘<samp><span class="samp">mv tmpindex.html index.html</span></samp>’<dd>The body part of the html-document <samp><span class="file">index.html</span></samp> is replaced by the body of the document <samp><span class="file">nicebody.html</span></samp>.
</dl>
<div class="node">
-<p><hr>
<a name="Problems"></a>
+<p><hr>
Previous: <a rel="previous" accesskey="p" href="#bbe-programs">bbe programs</a>,
Up: <a rel="up" accesskey="u" href="#Top">Top</a>
@@ -522,7 +522,7 @@
<p><a name="index-bugs-11"></a><a name="index-problems-12"></a>
If you find a bug in <samp><span class="command">bbe</span></samp>, please send electronic mail to
<a href="mailto:tjsa@iki.fi">tjsa@iki.fi</a>. Include the version number, which you can find by
-running `<samp><span class="samp">bbe --version</span></samp>'<!-- /@w -->. Also include in your message the
+running ‘<samp><span class="samp">bbe --version</span></samp>’<!-- /@w -->. Also include in your message the
output that the program produced and the output you expected.
<p>If you have other questions, comments or suggestions about
|