A quick Q: how do I command something in large amount


in some directory it has some files, let's say:

a.txt b.txt c.txt d.txt

I want to run a command, suppose it's

txt2pdf -input a.txt -output a.pdf

what if I want to do like

txt2pdf -input *.txt -output *.txt

I tried in bash,

for i in a b c
txt2pdf -input i.txt -out i.pdf

my questions is that how can I read so many files (a, b, c) quickly into
this bash script?

or are there some tips to do it?

Thanks very much for any suggestions,

sorry I can only think of the debian user list to ask now.

Best Regards,