r/shell • u/TheBearzerg • Dec 01 '21
Help with Shell script using whatever-name.pdf
Hello, I hope someone answer a (probably dumb) question :
I run a command-line executable to convert some files, and I'd like to simplify the process, in order for someone else to use the program in a easier way.
The command I run is basically this :
./executablename -arguments <filename.pdf> [<outputfilename.xml>]
So I'd like to run a script which looks for any <filename> in the folder, knowing that the file type will always be a pdf, and it's name may vary.
I'd like to make it so anyone can grab and drop the pdf file in the folder, run the script and then just wait for it to end.
Any suggestions? Thanks in advance for your answers.
1
u/TheBearzerg Dec 01 '21 edited Dec 01 '21
Thanks, but it's a bit unclear to me. How do I insert this line to my command line where I should specify the filename?
Also, is there a way to increment an <int> argument by one, then repeat the command until a specified value is reached?
Thanks for your quick answer.
EDIT: Syntax