HSI Special Topics - Tricks and Tips

This page describes some of the ways in which HSI has been used to perform non-obvious functions. If you have a request for a topic that is not covered in this section, or you have a nifty trick to share, please send email to the HSI team so that we can post it here.



  • By default, the "get" command will retrieve the specified list of files in tape and position order.  Also note that it may be necessary to use the "-A" option if auto-scheduling has been disabled at the site.

    However, this only applies to a single "get" command - if multiple "get" commands are issued, each command is independent of any others, and only the list of files specified by the single "get" command will be optimized for retrieval. .

    The easiest way to optimize a single "get" command is to use the "here-document" form of the command, by creating an IN file that looks like this:

    get << EOF
       file1
       file2
       file3
    ...
    EOF

  • Working with pathnames containing special characters
    A common problem is working with filenames containing spaces and special characters that are normally used for pattern-matching. An example of this is shown below:

  • Run-202 Future Trends in Automobile Design.pdf

    Pathnames that contain whitespace characters can be enclosed in single or double quotes, or the whitespace characters can be escaped by backslashes.
    For example:

    ls "Run-202 Future Trends in Automobile Design.pdf"
    or
    ls Run-202\ Future\ Trends\ in\ Automobile\ Design.pdf

    A more difficult situation is a filename that contains characters that are normally used for filename globbing.  For example:

    Robotics[102]: Design and Development

    This pathname contains both spaces and square brackets, which are normally used as pattern-matching characters (see "Wildcard characters").  To avoid pattern-matching by the shell (ksh, csh, ...), filenames can be enclosed in single quotes. However, using single quotes for this pathname does not work as it would with the shell , because HSI's command parser does not currently currently distinguish between single and double quotes. (note: this will be corrected in a future version).

    The simplest way to deal with filenames that contain wildcard characters is to disable filename globbing by issuing the "glob" command.  This command is a toggle - each time it is issued, its state switches between "enabled" and "disabled". The command may be issued any number of times within a single HSI session.  The initial state when HSI starts up is "enabled". When filename globbing is disabled, HSI does not check for wildcard characters when it is matching filename patterns, instead, filenames are matched literally, character-for-character.  

    For the example above, the following could be used:
    1. disable filename globbing
       glob  
    2. issue command(s) (Note that quotes are still needed because of whitespace characters in the HPSS pathname)
       ls -l "Robotics[102]: Design and Development"
       get roboticsCourse : "Robotics[102]: Design and Development"
    3. re-enable filename globbing
       glob