Artificial intelligent assistant

Keeping dirs in order with GNU Parallel I need to copy a large amount of files into their own directories. The issue I am having is keeping them in order when I copy them with GNU parallel. For example, file_1.output gets placed in dir_19. Here is what I have so far that is working, besides the order of files. ls *.output > copy.list parallel "mkdir cele_{}" ::: {1..10000} parallel -k --link "cp {} cele_{}" :::: copy.list ::: {1..10000} Is there a way to do this without sacrificing parallel? (Inspired by <

You can use `--rpl` to define your own replacement string and then use that both for `mkdir` and `cp`.


ls *.output | parallel --rpl '{dir} s/\.output$/_dir/' 'mkdir {dir} && cp {} {dir}'

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 49eaf503cad7210b68c33d1e7f29f1d2