Difference between revisions of "Bunset"

From Scriptwiki
Jump to: navigation, search
m
 
m
 
(8 intermediate revisions by 2 users not shown)
Line 1: Line 1:
The bunset command is used to unset a [[Binary Files|binary file]].
+
The bunset command is used to unset a [[:Category:Binary Files|binary file]].
 
  <nowiki>bunset <&binvar> [&binvar &binvar ... &binvar]</nowiki>
 
  <nowiki>bunset <&binvar> [&binvar &binvar ... &binvar]</nowiki>
This unsets all specified binary files. Unlike [[unset]], bunset doesn't work with wildcards.
+
This unsets all specified binary files. Unlike [[unset]], bunset doesn't work with [[Wildcard|wildcards]].
  
 
== Examples ==
 
== Examples ==
  [[bset]] &test 1 65
+
  [[bset]] &test 1 65 66 67
  echo -a [[$bvar]](&test,0)
+
  [[echo]] -a [[$bvar]](&test,0) returns ''3''
 
  bunset &test
 
  bunset &test
  echo -a [[$bvar]](&test,0)
+
  echo -a $bvar(&test,0) returns ''0''
In this case the first echo will echo "1" as &test is filled with 1 byte, the second echo will echo "0" as &test is unset.
+
In this case the first echo will echo 3 as &test is filled with 3 bytes, the second echo will echo 0 as &test is unset.
 +
 
 +
bset &test 1 65 66 67
 +
bset &another 1 97 98
 +
echo -a $bvar(&test,0) returns ''3''
 +
echo -a $bvar(&another,0) returns ''2''
 +
bunset &test &another
 +
echo -a $bvar(&test,0) returns ''0''
 +
echo -a $bvar(&another,0) returns ''0''
 +
This is an example of two binary files being unset with one command.
 +
 
 +
 
 +
[[Category:Binary Files]]
 +
[[Category:Commands]]

Latest revision as of 20:40, 13 October 2006

The bunset command is used to unset a binary file.

bunset <&binvar> [&binvar &binvar ... &binvar]

This unsets all specified binary files. Unlike unset, bunset doesn't work with wildcards.

Examples

bset &test 1 65 66 67
echo -a $bvar(&test,0) returns 3
bunset &test
echo -a $bvar(&test,0) returns 0

In this case the first echo will echo 3 as &test is filled with 3 bytes, the second echo will echo 0 as &test is unset.

bset &test 1 65 66 67
bset &another 1 97 98
echo -a $bvar(&test,0) returns 3
echo -a $bvar(&another,0) returns 2
bunset &test &another
echo -a $bvar(&test,0) returns 0
echo -a $bvar(&another,0) returns 0

This is an example of two binary files being unset with one command.