$ cat inventory Item Amount Cost Value Description ---- ------ ---- ----- ----------- 1 4 50.1 rubber gloves 2 100 5.23 500 test tubes 3 5 80 400 clamps 4 23 19 437 plates 5 99 24 2376 cleaning cloth 6 89 147 13083 bunsen burners 7 5 175 875 scales 8 35 105 0 pipettes$ cat inventory.r Offset --------- 70 94 120 138 157 185 215 234
Let's delete records 3 and 6 from inventory and its index inventory.r. We don't need to specify keycolumn in this example because the method used to index the table simply keeps track of rows without regard to their contents:
$ (echo 3; echo 6) | delete -mr inventory $ cat inventory Item Amount Cost Value Description ---- ------ ---- ----- ----------- 1 4 50.1 rubber gloves 2 100 5.23 500 test tubes 4 23 19 437 plates 5 99 24 2376 cleaning cloth 7 5 175 875 scales 8 35 105 0 pipettes$ cat inventory.r Offset --------- 70 94 138 157 215 234
The result of the delete command is that records 3 and 6 are blank and the corresponding offsets in the index table have been removed. SEE ALSO