I've got a file, that contains about 20k strings. Each string in that file should be an argument for a command within bash script.
At first my script generates a file with this strings.
find /home/alotoffolders -type f -name "*.mp4" | grep some_greps > ~/tests/find_smth
After that trying to set a variable, that will be a part of argument
filename=$(cut -d/ -f11 ~/tests/find_smth)
Then I'm trying to read all file line by line and use every string as an input argument (seems like it works), but for output - there is some issue.
for i in `cat ~/tests/find_smth`; do ./other_script -input $i -output /home/folder1/folder2/$filename; done
Script can't see the static path before $filename.
Where is the problem?