source: ether_ndacc/trunk/dev_ndacc/livraison/src/bencherif/run_ndacc @ 84

Last change on this file since 84 was 84, checked in by cbipsl, 14 years ago

import ether_ndacc

  • Property svn:executable set to *
File size: 1.5 KB
Line 
1#!/bin/ksh
2
3#parametres en entree
4
5typeset -i NbrOptionOblig=0
6typeset -i nbfiles=0
7while [ $# -ge 1 ]
8do
9  case $1 in
10    -y) shift 1;annee="$1"; NbrOptionOblig=$(($NbrOptionOblig+1));; #annee traitee
11    -s) shift 1;suf="$1"; NbrOptionOblig=$(($NbrOptionOblig+1));; #sufixe des fichiers de données
12    -d) shift 1;rep_data="$1"; NbrOptionOblig=$(($NbrOptionOblig+1));; #repertoire des fichiers de donnees
13    -r) shift 1;reader="$1"; NbrOptionOblig=$(($NbrOptionOblig+1));; #nom du lecteur
14    -dr) shift 1;rep_reader="$1"; NbrOptionOblig=$(($NbrOptionOblig+1));; #repertoire du lecteur
15    -m) shift 1;debug="$1"; NbrOptionOblig=$(($NbrOptionOblig+1));; #mode affichage
16    *) print 'Parameter ' $1 'not defined';exit 1;;
17  esac
18  shift 1
19done
20
21if [[ $debug == '' ]]
22then
23        debug=1
24fi
25
26anneeshort=`echo $annee | cut -c2-`
27echo $anneeshort
28
29list_mois="01 02 03 04 05 06 07 08 09 10 11 12"
30
31
32for mois in $list_mois
33do
34        list_file=`ls $rep_data./$suf$anneeshort$mois*.run`
35       
36        if [[ -z $list_file ]]
37        then
38                echo "Pas de donnees pour le $mois/$annee"
39        else
40                echo "oui"
41       
42                list_file=`ls $rep_data./$suf$anneeshort$mois*.run`
43                rm data_files_tmp
44
45                echo "$rep_data" > data_files_tmp
46                nbfiles=`ls $rep_data./$suf$anneeshort$mois*.run | wc -l`
47                echo "$nbfiles" >> data_files_tmp
48                echo "$debug" >> data_files_tmp
49                echo "$mois" >> data_files_tmp
50                echo "$annee" >> data_files_tmp
51
52                for file in $list_file
53                do
54                        echo "$file" >> data_files_tmp
55                done
56
57                ./treat_files_list data_files_tmp
58        fi
59done
60
Note: See TracBrowser for help on using the repository browser.