From 0ea6bd86634122dd9c12dd97d02ee5ef1025a3db Mon Sep 17 00:00:00 2001 From: marco Date: Thu, 17 Oct 2019 14:27:32 +0200 Subject: [PATCH] Carica file su 'STATS-PROC' Versione finale script con gestione file .req e relative cartelle --- STATS-PROC/admodelling.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 STATS-PROC/admodelling.sh diff --git a/STATS-PROC/admodelling.sh b/STATS-PROC/admodelling.sh new file mode 100644 index 0000000..f38b53b --- /dev/null +++ b/STATS-PROC/admodelling.sh @@ -0,0 +1,17 @@ +#!/bin/bash +cd /home/FBF/IN/ +files=(`find ./ -maxdepth 1 -name "*.req"`) +if [ ${#files[@]} -gt 0 ]; then + find . -name '*.req' | sed -r 's/^.{2}//' | sed -r 's/.{4}$//' | while read line; do + mv $line /home/FBF/WIP/ + mv $line.req /home/FBF/WIP/$line + cp /root/Script_plot_density_mixture.R /home/FBF/WIP/$line + cd /home/FBF/WIP/$line + Rscript Script_plot_density_mixture.R + rm Script_plot_density_mixture.R + mv /home/FBF/WIP/$line /home/FBF/OUT/ + cd /home/FBF/IN/ + done +else + exit +fi