I have hundreds of files, named as follows:
RG1-t.txt
RG1-n.txt
RG2-t.txt
RG2-n.txt
etc...
I would like to use GNU parallel to run scripts on them, but I struggle to get the basenames of the files, so RG1, RG2 etc... so that I can run:
ls RG*.txt | parallel "command.sh {basename}-t.txt {basename}-n.txt > {basename}.out"
resulting in the files RG1.out, RG2.out etc. Any ideas?