I have data that looks like this (let this submit.txt file):
dir1/pmid_5409464.txt dir1/pmid_5788247.txt dir1/pmid_4971884.txt
What I want to do is modify the regexp of the embedded file so that it will result in the following
perl mycode.pl /home/neversaint/dir1/pmid_5409464.txt > /home/neversaint/dir1/pmid_5409464.output perl mycode.pl/home/neversaint/dir1/pmid_5788247.txt > /home/neversaint/dir1/pmid_5788247.output perl mycode.pl /home/neversaint/dir1/pmid_4971884.txt > /home/neversaint/dir1/pmid_4971884.output
Is there one SED / Perl slot for this?
My difficulty is to capture the input file name, and then create an output file ( .output ) - for each line - based on this. I am stuck on this:
sed 's/^/perl mycode.pl \/home\/neversaint\/dir1\//g' submit.txt | sed 's/$/ >/'
source share