USAGE:
   cp-from-sg [options] { month | prev } [day-expression [day-expression ...]]

PURPOSE:
Copies GWR UIPC collected data from machine Brimer to Tidedata and Tidearchive.
This program is installed on machine utter under /home/scg/bin

In the most simple form,
   cp-from-sg -X prev
the command copies all data types of the previous month from 
RAW_o054  DAY_o054  and  MON_o054 
on machine brimer, bzip2's the RAW files, and copies the bunch to the archive. The scope of the RAW data is extended to the
first day of the current month. Therefore, this script should be run in this form not before the second day of a month.

For a specific month, month  must be given as  01...12. Extension of RAW to the first day of the following month
will be attempted.

In the version with specified day-expressions, the scope is limited to RAW files.

If days are not specified, only new files are scp'ed - unless option -F is used.  

OPTIONS:
                                                                                       [defaults]
_________________________________________________________________________________________________

 -y year         - year is the target year given as a two-digit integer             [actual year]

 -d 'ty ty ..'   - ty  is the two-letter designation of data types RAW and DAY,
                   e.g.
'A1 A2' or 'A? L?' etc.                                            ['??']

 -D exclude      - a string that may contain R M and/or D to exclude RAW, MON
                   and/or DAY files                                                           [-]


 -R -M -D        - to exclude one of RAW MON and DAY                               [all included]

 -t archivetasks - a string that may contain A (archive) and/or Z (bzip2).
                   Specify N to skip both tasks                                              [AZ]

 
-X              - carry out all the tasks                               [only echo the commands]
 -A              - skip all but the archive tasks, echo the other commands.
 -C              - scp and skip the archive task but echo the commands
.

 -F              - Force download despite files are already present on the
                   receiving disks (the test is made on the monthly files
                   and on day 15 of the daily files). 
 
DAY-EXPRESSION:

When day expressions are  specified, the scope of operations is limited to RAW data. No automatic day extension will occur.
The expressions can specify days one-by-one or expressions of globbing, e.g.  '01' '0[1-9]' '1?' '[1-2]?'

DIRECTORIES:
Data is collected in two trees.
/home/scg/Tidedata2009o054 2010o054 ...
/home/scg/Tidearchive/ symlink to /Archive/Tidedata/ 2009o054 2010o054 ...
.bye