1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
|
#!/bin/sh
# Execution program
rm -f out
make
echo""
echo "Elapsed time :"
time -p ./out
echo ""
# Creation new directory
# test -d Rep teste si le repertoire Rep existe
# test ! -d Rep teste si le repertoire Rep n'existe pas
# faire un man test pour les options
if [ ! -d ../Outputs ] # teste si le repertoire ../Outputs n'existe pas
then
mkdir ../Outputs
fi
if [ ! -d ../Outputs/Inputs ]
then mkdir ../Outputs/Inputs
fi
count=1 # counter
for i in `(ls ../Outputs)`
do
if [ -d ../Outputs/Output$count ]
then
count=`expr $count + 1`
fi
done
mkdir ../Outputs/Output$count
# copy output files in the last directory created : ../Outputs/Output$count
mv Particle* ../Outputs/Output$count
mv RandomInitialConditions.txt ../Outputs/Output$count
mv MeanTP.txt ../Outputs/Output$count
mv Volumes.txt ../Outputs/Output$count
# copy input files in the last directory created : ../Outputs/Output$count
cp input.txt ../Outputs/Output$count
cp system.txt ../Outputs/Output$count
# copy the file input.txt under the name input$count.txt in the directory
# ../Outputs/Inputs
cp input.txt ../Outputs/Inputs/input$count.txt
echo "Creation of the directory ../Outputs/Output$count"
echo"" |
Partager