Project

General

Profile

Bset » History » Version 2

Per Amundsen, 08/09/2015 05:49 AM

1 1 Per Amundsen
_Added in 1.9.0_
2
3
*/bset [-t] <&binvar> <N> <asciivalue> [asciivalue ... asciivalue]*
4
5
Sets the <N>th byte in binary variable &binvar to the specified ascii value.
6
7
If the &binvar docent exists it is created.
8
If <N> is larger than the size of &binvar it will be zero filled up to <N> bytes.
9 2 Per Amundsen
If you specify multiple "ASCII":http://www.asciitable.com/ values, they are copied to successive positions after byte position N.
10 1 Per Amundsen
11
*Switches*
12
13
-t - Treat values a plain text.
14
15
*Parameters*
16
17
<&binvar> - The &binvar to modify.
18
<N> - The byte to modify.
19 2 Per Amundsen
<asciivalue> - The "ASCII":http://www.asciitable.com/ value to insert.
20 1 Per Amundsen
21
*Example*
22
23
<pre>
24
alias example {
25 2 Per Amundsen
  ; Create a binary variable set it to "This is fun!"
26 1 Per Amundsen
  bset -t &Example 1 This is fun!
27
 
28 2 Per Amundsen
  ; Print out the content of the variable
29 1 Per Amundsen
  echo -a $bvar(&Example, 1-).text
30
}
31
</pre>