Changeset 127 for trunk/IPs/systemC/processor/Morpheo/Script/execute.sh
- Timestamp:
- Jun 17, 2009, 11:21:10 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Script/execute.sh
r126 r127 88 88 done < ${FILE_CMD}; 89 89 90 local -i NB_DIGIT=0; 91 local -i x=${#COMMAND[*]}; 92 93 while test ${x} -ne 0; do 94 NB_DIGIT=$((${NB_DIGIT} + 1)); 95 x=$((${x} / 10)); 96 done; 97 90 98 echo " * {"$(my_date)"} <${ID}> is ready"; 91 99 … … 127 135 # Test if command is empty ! 128 136 if test ! -z "${COMMAND[${CPT}]}"; then 129 # echo " * {"$(my_date)"} <${ID}> execute command [${CPT}] : ${COMMAND[${CPT}]}"; 130 echo " * {"$(my_date)"} <${ID}> command [${CPT}] : execute"; 137 local NUM=$(printf %.${NB_DIGIT}d ${CPT}); 138 139 # echo " * {"$(my_date)"} <${ID}> execute command [${NUM}] : ${COMMAND[${CPT}]}"; 140 echo " * {"$(my_date)"} <${ID}> command [${NUM}] : execute"; 131 141 local PATH_CURRENT=${PWD}; 142 132 143 cd ${PATH_WORK} &> /dev/null; 133 mkdir "Task_${ CPT}" &> /dev/null;134 cd "Task_${ CPT}" &> /dev/null;144 mkdir "Task_${NUM}" &> /dev/null; 145 cd "Task_${NUM}" &> /dev/null; 135 146 echo "id : ${ID}" > ${OUTPUT_FILE_INFO}; 136 147 echo "host : ${HOSTNAME}" >> ${OUTPUT_FILE_INFO}; … … 143 154 ./${OUTPUT_FILE_CMD} &> ${OUTPUT_FILE_OUT}; 144 155 cd ${PATH_CURRENT} &> /dev/null; 145 echo " * {"$(my_date)"} <${ID}> command [${ CPT}] : done";156 echo " * {"$(my_date)"} <${ID}> command [${NUM}] : done"; 146 157 fi; 147 158 done;
Note: See TracChangeset
for help on using the changeset viewer.