Last change
on this file since 588 was
579,
checked in by torrento, 13 years ago
|
version adaptee a grid engin (ana)
|
File size:
1.3 KB
|
Rev | Line | |
---|
[507] | 1 | #!/bin/sh |
---|
| 2 | #liste des "sources" enregistrees sous Amas |
---|
| 3 | GREP=/bin/grep |
---|
| 4 | AWK=/bin/awk |
---|
| 5 | ECHO=/bin/echo |
---|
| 6 | MKDIR=/bin/mkdir |
---|
| 7 | CAT=/bin/cat |
---|
| 8 | PRINTF=/usr/bin/printf |
---|
| 9 | RM=/bin/rm |
---|
| 10 | SORT=/bin/sort |
---|
| 11 | XARGS=/usr/bin/xargs |
---|
| 12 | WC=/usr/bin/wc |
---|
| 13 | DefaultIFS=$' \t\n' |
---|
| 14 | IFS=$DefaultIFS |
---|
| 15 | |
---|
| 16 | # Irods environment settings |
---|
| 17 | . /usr/local/shared/bin/irods_env.sh -noverbose |
---|
| 18 | |
---|
| 19 | scriptName="`basename $0`" |
---|
| 20 | $ECHO "Processing script ${scriptName} at `date`" |
---|
| 21 | |
---|
| 22 | #Path to public backupable path |
---|
| 23 | publicpath="/afs/in2p3.fr/home/c/campagne/public" |
---|
| 24 | |
---|
| 25 | #Path where the job will do temporary IO |
---|
[579] | 26 | . ${SCRIPTPATH}/set_iojobpath.sh |
---|
| 27 | iojobpath=$(set_iojobpath) |
---|
[507] | 28 | cd ${iojobpath} |
---|
| 29 | |
---|
| 30 | |
---|
| 31 | OUT1=./baoils.$$ |
---|
| 32 | ils /baoradio/data/AmasNancay/ > ${OUT1} |
---|
| 33 | OUT2=./baoawk1.$$ |
---|
| 34 | $AWK '($1=="C-") {print $2}' ${OUT1} > ${OUT2} |
---|
| 35 | $RM $OUT1 |
---|
| 36 | #Sequence |
---|
| 37 | tableau=( `$CAT $OUT2 | $AWK '{print $1}'` ) |
---|
| 38 | IFS=' |
---|
| 39 | ' |
---|
| 40 | tableau=( $( $PRINTF "%s\n" "${tableau[@]}" | $AWK 'x[$0]++ == 0' ) ) |
---|
| 41 | IFS=$DefaultIFS |
---|
| 42 | |
---|
| 43 | $RM $OUT2 |
---|
| 44 | |
---|
| 45 | for i in ${tableau[@]} |
---|
| 46 | do |
---|
| 47 | $ECHO "source $i" |
---|
| 48 | listedate=( `ils $i | $AWK '($1=="C-"){print $2}'`) |
---|
| 49 | IFS=' |
---|
| 50 | ' |
---|
| 51 | listedate=( $( $PRINTF "%s\n" "${listedate[@]}" | $AWK 'x[$0]++ == 0' ) ) |
---|
| 52 | IFS=$DefaultIFS |
---|
| 53 | |
---|
| 54 | for j in ${listedate[@]} |
---|
| 55 | do |
---|
| 56 | gainOk=`ils ${j} | $GREP -i "gain_" | $WC -l` |
---|
| 57 | if [ ${gainOk} -gt 0 ]; then |
---|
| 58 | $ECHO ">>> $j ---> GAIN Done (${gainOk})" |
---|
| 59 | else |
---|
| 60 | $ECHO ">>> $j ---> GAIN To be computed" |
---|
| 61 | fi |
---|
| 62 | done |
---|
| 63 | done |
---|
Note: See
TracBrowser
for help on using the repository browser.