Skip to content

Commit afc8c48

Browse files
Create moving_model_files.sh
1 parent 9f0a38e commit afc8c48

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

moving_model_files.sh

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Using a FOR loop for each file in 'model_out/' Folder
2+
3+
4+
for file in model_out/*
5+
do
6+
# Creating a CASE statement for each file's contents
7+
8+
case $(cat $file) in
9+
10+
# Matching on tree and non-tree models
11+
*"Random Forest"*|*GBM*|*XGBoost*)
12+
mv $file tree_models/ ;;
13+
14+
*KNN*|*Logistic*)
15+
rm $file ;;
16+
17+
# Creating a default
18+
*)
19+
echo "Unknown model in $file" ;;
20+
esac
21+
22+
done

0 commit comments

Comments
 (0)