I wrote a makefile and suggested that I have the following:
FILES = file1.py \
folder1/file2.py \
folder2/file3.py
And I have a for loop:
-@for file in $(FILES); do \
echo $${file/folder1\/}; \
done
The above text will print:
file1.py
file2.py
folder2/file3.py
The output I want is:
file1.py
file2.py
file3.py
I looked through the documentation on shell extensions, but have not yet found a way to handle this. Can I learn how to change the code to get the correct result? Any help would be greatly appreciated.
EDIT: syntax
source
share