Ignore:
Timestamp:
Mar 5, 2020 3:31:21 PM (5 years ago)
Author:
raasch
Message:

add cycle number to initial files too (000), remove compatibility for cycle numbers which are less than three digits wide

File:
1 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/SCRIPTS/batch_scp

    r3549 r4443  
    2727# -----------------
    2828# $Id$
     29# add cycle number to initial files too (000),
     30# remove compatibility for cycle numbers which are less than three digits wide
     31#
     32# 3549 2018-11-21 15:44:44Z raasch
    2933# english translation of german comments / variable names
    3034#
     
    427431          then
    428432             (( maxcycle = icycle ))
    429 
    430                  # FOR COMPATIBILITY REASONS WITH OLDER VERSIONS
    431                  # CHECK IF CYCLE NUMBER CONTAINS LEADING ZEROS
    432               if [[ $(echo $cycle | cut -c1) = 0 ]]
    433               then
    434                  leading_zero=true
    435               else
    436                  leading_zero=false
    437               fi
    438433          fi
    439434
     
    464459                   (( maxcycle = usecycle ))
    465460                else
    466                     printf "  >>> Unfied cycle number cannot be used\n"
     461                    printf "  >>> Unified cycle number cannot be used\n"
    467462                fi
    468463             fi
    469              cyclestring=`printf ".%03d" $maxcycle`
    470           else
    471              if (( maxcycle == 0 ))
    472              then
    473                 cyclestring=""
    474              else
    475                 cyclestring=`printf ".%03d" $maxcycle`
    476              fi
    477           fi
     464          fi
     465          cyclestring=`printf ".%03d" $maxcycle`
    478466       else
    479467          if [[ $overwrite = false ]]
     
    487475       if [[ $absolut = false ]]
    488476       then
    489           if (( maxcycle == 0 ))
    490           then
    491              cyclestring=""
    492           else
    493 
    494                 # MAKE CYCLE NUMBER THREE DIGITS WIDE
    495              if [[ $leading_zero = true ]]
    496              then
    497                 cyclestring=`printf ".%03d" $maxcycle`
    498              else
    499                 cyclestring=.$maxcycle
    500              fi
    501              (( maxcycle = 0 ))
    502           fi
     477             # MAKE CYCLE NUMBER THREE DIGITS WIDE
     478          cyclestring=`printf ".%03d" $maxcycle`
    503479       else
    504480          cyclestring=""
     
    511487    then
    512488       (( maxcycle = usecycle ))
    513        cyclestring=`printf ".%03d" $usecycle`
    514     else
    515        cyclestring=""
    516     fi
     489    fi
     490    cyclestring=`printf ".%03d" $maxcycle`
    517491
    518492       # EXIT, IF FILE SHALL BE GET FROM THE TARGET HOST, BUT DOESN'T EXIST
     
    526500
    527501
    528     # IF A FOLDER IS CREATED, THE FILENAME MUST NOT CONTAIN A CYCLE NUMBER IN
    529     # ANY CASE, SINCE IT CANNOT HAVE ONE
    530  if [[ $make_catalog = force ]]
    531  then
    532     cyclestring=""
    533     (( maxcycle = 0 ))
    534  fi
    535 
    536  
    537502    # IF NAME-OPTION (-n) IS CHOSEN, ONLY DETERMINE THE LOCAL FILENAME ON THE
    538503    # TARGET HOST AND EXIT THE SCRIPT
     
    630595          if [[ $? != 0 ]]
    631596          then
    632                 # CHECK, OB IF FILE SIZES ON LOCAL HOST AND TARGET HOST MATCH
     597                # CHECK, IF FILE SIZES ON LOCAL HOST AND TARGET HOST MATCH
    633598             local_size=`ls -al  $2`
    634599             local_size=`echo $local_size | cut -d" " -f5`
Note: See TracChangeset for help on using the changeset viewer.