Project

General

Profile

Hdel » History » Revision 2

Revision 1 (Per Amundsen, 02/11/2014 03:55 PM) → Revision 2/5 (Per Amundsen, 08/13/2015 08:21 AM)

_Added in 1.9.0_ 

 */hdel [-sw] <name> <item>* 

 Deletes an item from a hash table. 

 *Switches* 

 -s - Displays the result. 
 -w - Indicates item is a wildcard. 

 *Parameters* 

 <name> - The hashtable to delete from. 
 <item> - The hashtable item to delete. 

 *Example* 

 <pre> 
 alias example { 
   ; Create ;Create a hash table hashtable and Add items. 
   /hadd -m example academic a 

    ; Add some items to the hash table.. 
   /hadd example academy a 
   /hadd example accelerate a 
   /hadd example accelerator a 
   /hadd example accept a 
   /hadd example access a 
   /hadd example accident a 
   /hadd example because b 
 
   ; Print number ;Print Nmber of items. 
   //echo /echo -a $hget(example, 0).item 
 
   ; Remove ;Remove everything matching wildcard 'a*'. by one. 
   /hdel -w example a* 
 
   ; Print ;Print number of items. 
   //echo /echo -a $hget(example, 0).item 
 
   ; Free ;Free table. 
   /hfree example 
 } 
 </pre>