HPSS Mass StorageRelated InformationHPSS Software DownloadsHPSS Collaboration |
Using HPSS from Batch JobsOnce you are set up for automatic authentication (see the sections on HSI, HTAR, and ftp/pftp) you can access HPSS from within batch scripts. HSI will accept one-line commands on the HSI command line, e.g.: hsi put filename HSI, ftp, and pftp read from Standard Input (STDIN) and a list of commands can be placed in a text file (script) and redirected into the given utility, e.g.: ftp < file_with_ftp_commands "Here" DocumentsAnother method uses what are called "Here Documents," in which the commands are embedded in the batch script rather than in a separate file external to the main script. The start of a "here-doc" block in a script is signalled by the presence of double angle brackets: << followed by a identifying tag. Lines up to the line containing the tag are treated as if they had been typed at the command prompt. Here is a simple script which performs an ftp file transfer: pftp -v -i archive <<_EOS cd my_HPSS_directory mget data* quit _EOS This example will execute the FTP commands between the "_EOS" strings. |
Page last modified: Thu, 23 Jun 2005 21:47:13 GMT Page URL: http://www.nersc.gov/nusers/systems/hpss/usage_batch.php Web contact: webmaster@nersc.gov Computing questions: consult@nersc.gov Privacy and Security Notice |