Changeset 2600 for palm/trunk/SCRIPTS/palmrun
- Timestamp:
- Nov 1, 2017 2:11:20 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SCRIPTS/palmrun
r2566 r2600 27 27 # ----------------- 28 28 # $Id$ 29 # cycle numbers are made three digits wide 30 # 31 # 2566 2017-10-20 08:50:47Z raasch 29 32 # execute command for combine_plot_fields added 30 33 # "TEMPDIR" renamed "tempdir" … … 1017 1020 then 1018 1021 (( maxcycle = icycle )) 1022 1023 # FOR COMPATIBILITY REASONS WITH OLDER VERSIONS 1024 # CHECK IF CYCLE NUMBER CONTAINS LEADING ZEROS 1025 if [[ $(echo $cycle | cut -c1) = 0 ]] 1026 then 1027 leading_zero=true 1028 else 1029 leading_zero=false 1030 fi 1019 1031 fi 1020 1032 … … 1022 1034 rm filelist 1023 1035 1036 # MAKE CYCLE NUMBER THREE DIGITS WIDE 1037 if [[ $leading_zero = true ]] 1038 then 1039 cyclestring=`printf "%03d" $maxcycle` 1040 else 1041 cyclestring=$maxcycle 1042 fi 1043 1024 1044 # APPEND CYCLE NUMBER TO FILENAME 1025 1045 if (( maxcycle > 0 )) … … 1027 1047 if [[ "${extin[$i]}" != " " && "${extin[$i]}" != "" ]] 1028 1048 then 1029 filename=${filename}.$ maxcycle.${extin[$i]}1049 filename=${filename}.$cyclestring.${extin[$i]} 1030 1050 else 1031 filename=${filename}.$ maxcycle1051 filename=${filename}.$cyclestring 1032 1052 fi 1033 1053 else … … 1045 1065 if [[ "${actionin[$i]}" = di ]] 1046 1066 then 1047 frelin[$i]=${endin[$i]}.$ maxcycle1067 frelin[$i]=${endin[$i]}.$cyclestring 1048 1068 else 1049 frelin[$i]=${fname}${endin[$i]}.$ maxcycle1069 frelin[$i]=${fname}${endin[$i]}.$cyclestring 1050 1070 fi 1051 1071 else … … 1161 1181 if [[ "${actionout[$i]}" != a ]] 1162 1182 then 1183 cyclestring=`printf "%03d" $maxcycle` 1163 1184 if (( maxcycle > 0 )) 1164 1185 then 1165 filename_tmp=${filename}.$ maxcycle1186 filename_tmp=${filename}.$cyclestring 1166 1187 if cat /dev/null > $filename_tmp 1167 1188 then … … 2053 2074 if (( cycnum[$i] > 0 )) 2054 2075 then 2055 pathout[$i]=${pathout[$i]}.${cycnum[$i]} 2076 cyclestring=`printf "%03d" ${cycnum[$i]}` 2077 pathout[$i]=${pathout[$i]}.$cyclestring 2056 2078 fi 2057 2079 fi
Note: See TracChangeset
for help on using the changeset viewer.