Difference between revisions of "Bunset"

From Scriptwiki
Jump to: navigation, search
m (corrected binary files-link)
m
Line 5: Line 5:
 
== Example ==
 
== Example ==
 
  [[bset]] &test 1 65
 
  [[bset]] &test 1 65
  echo -a [[$bvar]](&test,0)
+
  echo -a [[$bvar]](&test,0) returns ''1''
 
  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 "1" as &test is filled with 1 byte, the second echo will echo "0" as &test is unset.
  
 
[[Category:Binary Files]]
 
[[Category:Binary Files]]
 
[[Category:Commands]]
 
[[Category:Commands]]

Revision as of 19:29, 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.

Example

bset &test 1 65
echo -a $bvar(&test,0) returns 1
bunset &test
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.