I have two files of file and directory names. I want to map mv
command from each row of a filenames file to each row in the directory names file. The files are small.
If it helps I have files named sequentially (say f1, f2, f3...f1000). Is there any way to do it in a loop reading one file and one directory?
There can be 3 use cases: One file to many directories, Many files to one directory and many files to many directories (1 file/line = 1 dir/line in my case). My use case pertains to the last one. I have seen xargs
being used in some of the use cases but I am not sure how to modify for my use case.
Following questions do not help: Moving large number of files