I'm using a tool that converts file types, but only works on one file at a time. I've put the URLs to these files into a text file, which I want to loop through with bash. The command then outputs files, but I want each file to be named uniquely. For example, output file one should be named output1.pdf, two should be output2.pdf, etc.
Here's what I have so far:
for i in `cat input.txt`; do
converttopdf $i output.pdf
done
But that will simply overwrite output.pdf over and over. How can I make it output a unique file each time?
converttopdf $i $i.pdfso you'd gettest.txt.pdfas output?