-
-
Save leohmoraes/835d7862aab633b9d40a9a85a9c7d03e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Use a FOR loop for each file in 'model_out/' | |
for file in my_r_scripts /* | |
do | |
# Create a CASE statement for each file's contents | |
case $(cat $file) in | |
# Match on tree and non-tree models | |
*"Random Forest"*|*GBM*|*XGBoost*) | |
mv $file tree_models/ ;; | |
*KNN*|*Logistic*) | |
rm $file ;; | |
# Create a default | |
*) | |
echo "Unknown model in $file" ;; | |
esac | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment