I want in my makefile to retrieve all textfiles (at the moment i just got one) from a certain subfolder and call in a loop a specific python script with each text file as an input parameter.
This is the code i currently have:
run_analysis:
    @echo "Get text files"
    txt_files=$(wildcard ./input/*.txt)
    @echo "Current text files are:"
    @echo $(txt_files)
    for txt_file in $(txt_files); do \
        @echo "Iteration" \
        @echo $(txt_file ) \
        python ./scripts/my_test_script.py $(txt_file ) ; \
    done
It seems the wildcard results are not stored in the variable.
My output looks the following:
Get text files
txt_files=./input/test_text_1.txt
Current text files are:
for txt_file in ; do \
    @echo "Iteration" \
    @echo  \
    python ./scripts/my_test_script.py  ; \
done
 
    