Project

General

Profile

Bset » History » Version 1

Per Amundsen, 02/08/2014 11:58 PM

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
If you specify multiple asciivalues, they are copied to successive positions after byte position N.
10
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
<asciivalue> - The ascii value to insert.
20
21
*Example*
22
23
<pre>
24
alias example {
25
  ;Create a binary variable set it to "This is fun!"
26
  bset -t &Example 1 This is fun!
27
 
28
  ;Print out the content of the variable
29
  echo -a $bvar(&Example, 1-).text
30
}
31
</pre>