DEIMOS
inventory script

Name

inventory -- convert between guiname, barcode, and blueprint ID

Purpose

Given a guiname, barcode number, or blueprint ID number, print
out the corresponding guiname, barcode number, or blueprint ID
number.

Usage

inventory [ -n | -p ] <type> [<from> <value> <to>]

Arguments

-p = prime; update inventory file
-n = noprime; do not update inventory file [default]
type = [ f(ilter) | s(litmask) | g(rating) ]
from = [ g(uiname) | b(arcode) | i(d)]
value = guiname, barcode, or id value to convert
to = [ g(uiname) | b(arcode) | i(d)]

Output

to STDOUT

Restrictions

none

Exit values

0 = normal completion
255 = wrong number of arguments
-1 = no match for specified value

Example

1. Print a list of all slitmasks in database:
deimos@polo> inventory s
guiname=s4 barcode=186 id=165
guiname=s6 barcode=183 id=167
guiname=s8 barcode=182 id=168
guiname=sa22 barcode=181 id=169
guiname=w42 barcode=176 id=175
guiname=w72 barcode=177 id=174
...

2. Obtain barcode for mask with guiname "sa22":
deimos@polo> inventory s g sa22 b
181

3. Obtain guiname for mask with barcode "181":
deimos@polo> inventory s b 181 g
sa22

4. Obtain guiname for mask with blueprint ID "169":
deimos@polo> inventory s i 169 g
sa22

4. Obtain guiname for mask with blueprint ID "169",
first updating the list to ensure most recent data:
deimos@polo> inventory -p s i 169 g
sa22

See Also

The shell script inventory
DEIMOS script index


Go to: DEIMOS Home Page - Instruments Home Page - Keck Home Page

Last modified: Thu Jun 18 11:46:29 2009