forked from ISUgenomics/common_scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJobTime2.sh
More file actions
executable file
·21 lines (20 loc) · 790 Bytes
/
JobTime2.sh
File metadata and controls
executable file
·21 lines (20 loc) · 790 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/bash
#PWD=$(pwd)
CDIR=${PWD##*/}
#PILAST=$(echo ${CDIR} | cut -d "_" -f 2)
#PROJNAME=$(echo ${CDIR} | cut -d "_" -f 3- )
for FILE in $(find . -name "*.o*.hpc5"); do
EFILE=$(echo $FILE | sed 's/\.o/.e/1')
CDATE=$(stat -c%y ${FILE} | cut -c1-10)
PROCTIME=$(grep "resources_used.cput" ${FILE} | awk '{print $NF}')
WALLTIME=$(grep "resources_used.walltime" ${FILE} | awk '{print $NF}')
JOBNAME=$(grep "Job_Name =" ${FILE} | awk '{print $NF}')
JOBID=$(grep "Job Id: " ${FILE} | awk '{print $NF}')
BNAME=$(basename ${FILE})
if [ -z "${PROCTIME}" ]; then
echo -n "";
else
echo -e "`date -d ${CDATE} +"%m-%d-%Y"`\tNA\t${PILAST}\tNA\t${PROCTIME}\tNA\t$NA\tNA\tNA\t${PROJNAME}\tJob:${JOBID}, ${JOBNAME}${MESSAGE}";
fi
unset MESSAGE
done