I have a grader for COCI (a competitive programming contest) that reads input files (txt[number].in
), compiles and runs a code (txt.cpp
) and matches the result with an output file (txt[number].out
).
The problem is, COCI problem's input files have format (txt.in.1
), (txt.in.2
), (txt.in.3
) etc and similar names for output files.
I need to change the extensions of the input files from txt.in.[number]
to txt[number].in
. (Need to do the same for the output files as well)
Can anyone help me with this?
I'm currently using 13.04 Ubuntu.
Best Answer
Using the terminal, I think this is the easiest way:
Here is a test:
By default,
mmv
is not installed in Ubuntu, but you can install it from terminal using the following command:See
man mmv
for more info.