Script started on Tue Apr 25 13:29:39 1989
zaphod|1% he -help
he [<file>] [-nobackup] [-batch]
Type <command> -help for usage of command
e.g. "open -help" give help on the open command
DO NOT just type the command and expect a help line
Some commands line delete do not need any argument
If you are just starting to learn, try this program on
a file that is expendable

List of commands:
----------------
open	Open hdf file
close	Close hdf file
revert	Revert to original file
next	Go to next element/group that satisfy predicate
prev	Go to previous...
help	This
info	Show information about data
dump	Do binary display of data
display	Display image using ICR
put	Put data element as binary into raw file
putr8	Put r8 group into raw files
getr8	Get r8 group from raw files
delete	Delete an element/group
write	Write data element/group to another hdf file
annotate Annotate an element
*Special Commands
if	Conditional statement
select	Loop for each element
alias	Set/show aliases
unalias
wait	Message and wait for return
zaphod|2% he
he> ! This is a script of a session on the HDF editor
he> ! It is meant as an example for any one learning to use the editor
he> 
he> ! the exclaimation mark in the FIRST column starts a comment
he> 
he> ! help command
he> help
Type <command> -help for usage of command
e.g. "open -help" give help on the open command
DO NOT just type the command and expect a help line
Some commands line delete do not need any argument
If you are just starting to learn, try this program on
a file that is expendable

List of commands:
----------------
open	Open hdf file
close	Close hdf file
revert	Revert to original file
next	Go to next element/group that satisfy predicate
prev	Go to previous...
help	This
info	Show information about data
dump	Do binary display of data
display	Display image using ICR
put	Put data element as binary into raw file
putr8	Put r8 group into raw files
getr8	Get r8 group from raw files
delete	Delete an element/group
write	Write data element/group to another hdf file
annotate Annotate an element
*Special Commands
if	Conditional statement
select	Loop for each element
alias	Set/show aliases
unalias
wait	Message and wait for return
he> 
he> ! opening a file
he> 
he> open -help
open <file> [-nobackup]
	-nobackup	Don't make a backup for this file.
he> 
he> open h1
he> 
he> ! look into the contents of this file
he> ! using info
he> 
he> info -help
info [-all] [-long] [-group] [-label]
	-all		Show info for all elements in file
	-long		Show more info
	-group		Organize info in group(s)
	-label		Show label if any
he> 
he> info -all -label -long
(1) Machine type        (Utility)   : (tag 107)
	Ref: 4369, Offset: 0, Length: 0 (bytes)
	Label: Sun Machine type??
(2) Scientific Data     (SciData)   : (tag 702)
	Ref: 1, Offset: 202, Length: 40000 (bytes)
(3) Number type         (Utility)   : (tag 106)
	Ref: 1, Offset: 40202, Length: 4 (bytes)
(4) SciData description (SciData)   : (tag 701)
	Ref: 1, Offset: 40206, Length: 22 (bytes)
(5) SciData scales      (SciData)   : (tag 703)
	Ref: 1, Offset: 40228, Length: 802 (bytes)
(6) SciData max/min     (SciData)   : (tag 707)
	Ref: 1, Offset: 41030, Length: 8 (bytes)
*(7) Scientific Data Group (SciData) : (tag 700)
	Ref: 1, Offset: 41038, Length: 16 (bytes)
	Label: testing 1 2 3 4 5 6 7 8 9 0....<additional stuff>
(8) Data Id Label       (Utility)   : (tag 104)
	Ref: 2, Offset: 41275, Length: 53 (bytes)
(9) Data Id Label       (Utility)   : (tag 104)
	Ref: 3, Offset: 41230, Length: 22 (bytes)
(10) Data Id Annotation  (Utility)   : (tag 105)
	Ref: 4, Offset: 41252, Length: 23 (bytes)
Empty (tag 1) : 6 slots.
he> info -group -all
**Group 1:
Scientific Data Group (SciData) : (tag 700), Ref: 1
Scientific Data     (SciData)   : (tag 702), Ref: 1
SciData description (SciData)   : (tag 701), Ref: 1
SciData scales      (SciData)   : (tag 703), Ref: 1
SciData max/min     (SciData)   : (tag 707), Ref: 1

**These do not belong to any group:
Machine type        (Utility)   : (tag 107), Ref: 4369
Number type         (Utility)   : (tag 106), Ref: 1
Data Id Label       (Utility)   : (tag 104), Ref: 2
Data Id Label       (Utility)   : (tag 104), Ref: 3
Data Id Annotation  (Utility)   : (tag 105), Ref: 4
Empty (tag 1) : 6 slots.
he> 
he> ! move in the file using next and prev
he> ! the move direction depend on the relative positions so it is often
he> ! necessary to do a info -all first
he> 
he> info -all
(1) Machine type        (Utility)   : (tag 107), Ref: 4369
(2) Scientific Data     (SciData)   : (tag 702), Ref: 1
(3) Number type         (Utility)   : (tag 106), Ref: 1
(4) SciData description (SciData)   : (tag 701), Ref: 1
(5) SciData scales      (SciData)   : (tag 703), Ref: 1
(6) SciData max/min     (SciData)   : (tag 707), Ref: 1
*(7) Scientific Data Group (SciData) : (tag 700), Ref: 1
(8) Data Id Label       (Utility)   : (tag 104), Ref: 2
(9) Data Id Label       (Utility)   : (tag 104), Ref: 3
(10) Data Id Annotation  (Utility)   : (tag 105), Ref: 4
Empty (tag 1) : 6 slots.
he> 
he> ! the star in the first column marks the current position
he> ! The next and prev commands work on prediactes
he> ! default prediacte is "group"
he> ! this means that each move will move to the next/prev group
he> ! if I now want to move to the max/min element, I can use the tag=
he> ! predicate
he> 
he> prev tag=707
he> info 
(6) SciData max/min     (SciData)   : (tag 707), Ref: 1
he> 
he> ! other predicates are ref", "any", with comparattors "=", "!=", ">", "<"
he> ! ">=", "<=" 
he> ! for example, "group ref >= 10" is legal and matches a group with ref>=10
he> 
he> ! this predicate for next and prev are persistent. That means that if I
he> ! now do another next, it will look for a tag=707
he> 
he> next
Reached end of file. Not moved.
he> info
(6) SciData max/min     (SciData)   : (tag 707), Ref: 1
he> 
he> ! to go back to groups 
he> next group
he> info
(7) Scientific Data Group (SciData) : (tag 700), Ref: 1
he> 
he> ! to see the binary representation of this elt
he> 
he> dump -help
dump [-offset <offset>] [-length <len>]
	[-decimal|-octal|-hexidecimal|-float|-ascii]
	Od the present element
	-offset		Start offset
	-length		Length to look at
	-decimal	Decimal format
	-octal		Octal format
	-hexidecimal	Hexidecimal format
	-float		Float format
	-ascii		Ascii format
he> 
he> dump 
0000000  001276 000001 001275 000001 001277 000001 001303 000001
0000020
he> 
he> dump -decimal
0000000  00702 00001 00701 00001 00703 00001 00707 00001
0000020
he> 
he> ! deleting groups
he> 
he> delete -help
delete
	Delete this element or group.
he> 
he> ! if an elt is required by other groups it is left alone
he> ! However, this is not perfect since the way the group membership 
he> ! is determined can be pretty ad hoc
he> 
he> info -all -group
**Group 1:
Scientific Data Group (SciData) : (tag 700), Ref: 1
Scientific Data     (SciData)   : (tag 702), Ref: 1
SciData description (SciData)   : (tag 701), Ref: 1
SciData scales      (SciData)   : (tag 703), Ref: 1
SciData max/min     (SciData)   : (tag 707), Ref: 1

**These do not belong to any group:
Machine type        (Utility)   : (tag 107), Ref: 4369
Number type         (Utility)   : (tag 106), Ref: 1
Data Id Label       (Utility)   : (tag 104), Ref: 2
Data Id Label       (Utility)   : (tag 104), Ref: 3
Data Id Annotation  (Utility)   : (tag 105), Ref: 4
Empty (tag 1) : 6 slots.
he> delete
he> info -all
(1) Machine type        (Utility)   : (tag 107), Ref: 4369
(3) Number type         (Utility)   : (tag 106), Ref: 1
(8) Data Id Label       (Utility)   : (tag 104), Ref: 2
(9) Data Id Label       (Utility)   : (tag 104), Ref: 3
(10) Data Id Annotation  (Utility)   : (tag 105), Ref: 4
Empty (tag 1) : 11 slots.
he> info -all -group

**These do not belong to any group:
Machine type        (Utility)   : (tag 107), Ref: 4369
Number type         (Utility)   : (tag 106), Ref: 1
Data Id Label       (Utility)   : (tag 104), Ref: 2
Data Id Label       (Utility)   : (tag 104), Ref: 3
Data Id Annotation  (Utility)   : (tag 105), Ref: 4
Empty (tag 1) : 11 slots.
he> 
he> ! lets delete an elt
he> 
he> next tag=104 ref=3
he> info -all
(1) Machine type        (Utility)   : (tag 107), Ref: 4369
(3) Number type         (Utility)   : (tag 106), Ref: 1
(8) Data Id Label       (Utility)   : (tag 104), Ref: 2
*(9) Data Id Label       (Utility)   : (tag 104), Ref: 3
(10) Data Id Annotation  (Utility)   : (tag 105), Ref: 4
Empty (tag 1) : 11 slots.
he> delete
he> info -all
(1) Machine type        (Utility)   : (tag 107), Ref: 4369
(3) Number type         (Utility)   : (tag 106), Ref: 1
(8) Data Id Label       (Utility)   : (tag 104), Ref: 2
(10) Data Id Annotation  (Utility)   : (tag 105), Ref: 4
Empty (tag 1) : 12 slots.
he> 
he> ! reverting to original file
he> ! this cannot work if nobackup is used when opening the file
he> 
he> revert
he> 
he> info -all
(1) Machine type        (Utility)   : (tag 107), Ref: 4369
(2) Scientific Data     (SciData)   : (tag 702), Ref: 1
(3) Number type         (Utility)   : (tag 106), Ref: 1
(4) SciData description (SciData)   : (tag 701), Ref: 1
(5) SciData scales      (SciData)   : (tag 703), Ref: 1
(6) SciData max/min     (SciData)   : (tag 707), Ref: 1
*(7) Scientific Data Group (SciData) : (tag 700), Ref: 1
(8) Data Id Label       (Utility)   : (tag 104), Ref: 2
(9) Data Id Label       (Utility)   : (tag 104), Ref: 3
(10) Data Id Annotation  (Utility)   : (tag 105), Ref: 4
Empty (tag 1) : 6 slots.
he> 
he> ! annotations
he> ! labels and descriptors
he> 
he> info -label -all
(1) Machine type        (Utility)   : (tag 107), Ref: 4369
	Label: Sun Machine type??
(2) Scientific Data     (SciData)   : (tag 702), Ref: 1
(3) Number type         (Utility)   : (tag 106), Ref: 1
(4) SciData description (SciData)   : (tag 701), Ref: 1
(5) SciData scales      (SciData)   : (tag 703), Ref: 1
(6) SciData max/min     (SciData)   : (tag 707), Ref: 1
*(7) Scientific Data Group (SciData) : (tag 700), Ref: 1
	Label: testing 1 2 3 4 5 6 7 8 9 0....<additional stuff>
(8) Data Id Label       (Utility)   : (tag 104), Ref: 2
(9) Data Id Label       (Utility)   : (tag 104), Ref: 3
(10) Data Id Annotation  (Utility)   : (tag 105), Ref: 4
Empty (tag 1) : 6 slots.
