STScI Logo

tscopy tables



tscopy -- Copy tables.


tscopy intable outtable


This task is used to copy tables. The input may be a filename template, including wildcard characters or the name of a file (preceded by an @ sign) containing table names. The output may be either a directory specification or a list of table names. If the output is a list of tables then there must be the same number of names in the input and output lists, and the names are taken in pairs, one from input and one from output. The input and output tables must not be the same.

This task supports row/column selectors in the input table name. These may be used to select subsets of both rows and columns from the input table. Type help selectors to see a description of the selector syntax.

NOTE: Be careful when using a wildcard for the extension. If you have the files and table.lis in the current directory, for example, then the command "tscopy tab* test/" would copy both files to the subdirectory test.


intable [file name template]
A list of one or more tables to be copied. Row/column selectors are supported.
outtable [file name template]
Either a directory name or a list of output table names. The standard value "STDOUT" generates ASCII output that can be redirected to a file.
(verbose = yes) [boolean]
Display names of input and output tables as files are copied?


1. To simply copy a table:

      cl> tscopy table tablecopy

2. To copy a table into an ASCII table:

      cl> tscopy table STDOUT > table.txt

3. To copy several tables:

      cl> tscopy table1,table2,tab67 a,b,c
      cl> tscopy tab*.tab a,b,c
In the latter case the extension is given explicitly in case there are other files beginning with "tab" that are not tables; there must be exactly three tables beginning with "tab" because the output list has three names.

4. To copy a set of tables to a new directory:

      cl> tscopy table*.tab directory
      cl> tscopy table*.tab directory$
      cl> tscopy table*.tab osdirectory

where "directory" is an IRAF environment variable for a directory name, and "osdirectory" is an operating system directory name (e.g., "/user/me/" in UNIX).

5. To copy a subset of rows and columns:

      cl> tscopy "[c:wave,flux][r:wave=(4000:5000)]" tableout

This command will copy only columns named "wave" and "flux" from the input table to the output. It will also select and copy only the rows in which the "wave" value lies between 4000 and 5000.



This task was written by Bernie Simon.



Search Form · STSDAS