Документ взят из кэша поисковой машины. Адрес оригинального документа : http://www.stsci.edu/spst/lrpg/man_txt/getvorp.txt
Дата изменения: Fri Apr 8 22:30:21 2011
Дата индексирования: Sat Mar 1 10:39:47 2014
Кодировка:



User Commands GETVORP(1)



NAME
getvorp - Extract sunit_id or prop_id from within a file.


SYNOPSIS:
getvorp [-p|-v] [-p|-v] {-5|-0|-7} {-s}


INTRODUCTION:
given a file containing embedded sunit_ids (either 6-
alphanumeric or 7-alphanumeric, or propids) or prop_ids
(either 4- or 5-digit), extract the prop_ids or sunit_ids as
requested by the user.:

This sed algorithm works on many test cases: match on any
non-numeric to start, and then grab a 0 or 1 if they exist,
then match 0-9 either 4 or 5 times, then (if requested) fol-
lowed by two alpha numerics and then anything else.


the mandatory 1st parameter is a choice between:
'-p' for 'search for prop_ids', or '-v' for
'search for sunit_ids',
the mandatory 2nd parameter is a choice between:
'-p' for 'print prop_ids', or '-v' for 'print
sunit_ids',
the optional 3rd and 4th parameters are switches control-
ling:
-5|-7|-0: whether lead-0 output formatting is
enforced for 4-digit prop_ids;
-s: perform a unique sort before outputting to
stdi/o.
The last command line parameter is always the filename.


NOTES AND CAUTIONS:
Note this could miss an sunit immediately followed by
another alphanumeric. Note also that this algorithm is not
designed to catch only prop_ids in a string and may be a bit
flakey if requesting search for prop_ids. It is most
robustly designed to catch sunits. If there are multiple
sunits for a given proposal, propsin will return a prop_id
for each line corresponding to each sunit found (i.e., it
will not do a 'uniq').


BUGS:
only capable of returning the first prop or sunit on the
line.






SunOS 5.10 Last change: 21 Feb 2007 1






User Commands GETVORP(1)



REVISION HISTORY:
April 26, 2006 ij written


CALLS USED:
bash routine that uses sed, nawk, and sort to extract the
unque sunits or prop ids


AUTHOR
I. Jordan












































SunOS 5.10 Last change: 21 Feb 2007 2