I have a question concerning the concatenation of two processes in the terminal. I have a folder with over 50.000 files. I used grep to look for those files containing a specific term:
grep -inrl "Bioethik_Debatte" /var/cqp/upload/heideko/import_files
which gives me a huge list like this:
I need to copy the resulting files into a new folder. I was thinking something like:
grep -inrl "Bioethik_Debatte" /var/cqp/upload/heideko/import_files | cp * bio_files/
My try might not make any sense. I'm just starting with the terminal. I just want to copy the files resulting from my grep search into a new folder called bio_files. I realised that what I get from grep is just the names of the files. But I want to use those names as input for the cp command. Any help is highly appreciated.