Last change
on this file since 4035 was
2413,
checked in by labetoulle, 9 years ago
|
Move all scripts to the same dir to use common configuration files
|
-
Property svn:executable set to
*
|
File size:
1.1 KB
|
Line | |
---|
1 | #!/bin/bash |
---|
2 | # |
---|
3 | # Author: Marie-Alice Foujols |
---|
4 | # |
---|
5 | #--------------------------------------------- |
---|
6 | while [ $# -ne 0 ] |
---|
7 | do |
---|
8 | case $1 in |
---|
9 | *) |
---|
10 | break ;; |
---|
11 | esac |
---|
12 | done |
---|
13 | |
---|
14 | #. /etc/profile |
---|
15 | |
---|
16 | # cron pour garder trace de la compta et des volumes de fichiers crees |
---|
17 | # a executer chaque matin a 6h00 |
---|
18 | |
---|
19 | # 1- sauvegarde des fichiers au fur et a mesure dans WORK |
---|
20 | cp /ccc/cont003/home/dsm/p86ipsl/CCC_MYPROJECT/OUT_CONSO_LOGIN /ccc/work/cont003/dsm/p86ipsl/CCC_MYPROJECT/OUT_CONSO_LOGIN_$(date +%F) |
---|
21 | cp /ccc/cont003/home/dsm/p86ipsl/CCC_MYPROJECT/OUT_CONSO_ALL /ccc/work/cont003/dsm/p86ipsl/CCC_MYPROJECT/OUT_CONSO_ALL$(date +%F) |
---|
22 | |
---|
23 | # 2- on garde la trace de chaque login, date en tete |
---|
24 | ccc_myproject|sed -e'1,/gencmip6/d' |sed -e'/Total/,$d'|grep -v Login|grep -v '^$/' | awk '{print system("echo -n $(date +%F)") " " $1 " " $2 }' >> /ccc/cont003/home/dsm/p86ipsl/CCC_MYPROJECT/OUT_CONSO_LOGIN |
---|
25 | |
---|
26 | # 3- on garde le total, date en tete |
---|
27 | echo $(date +%F) $( ccc_myproject|sed -e'1,/gencmip6/d' |grep Total |head -1 | awk '{print $2}' ) >> /ccc/cont003/home/dsm/p86ipsl/CCC_MYPROJECT/OUT_CONSO_ALL |
---|
28 | |
---|
29 | # 4- volume cree |
---|
30 | # par login qui a consomme |
---|
31 | # |
---|
Note: See
TracBrowser
for help on using the repository browser.