Can a bash/shell expert help me in this? Each time I use PDF to split large pdf file (say its name is
) into separate pages, where each page is one pdf file, it creates files with this pattern
"X 3.pdf" etc...
The file name "X" above is the original file name, which can be anything. It then adds one space after the name, then the page number. Page numbers always start from 1 and up to how many pages. There is no option in adobe PDF to change this.
I need to run a shell command to simply remove/strip out all the "X " part, and just leave the digits, like this
Not being good in pattern matching, not sure what regular expression I need.
I know I need something like
for i in *.pdf; do mv "$i$" ........; done
And it is the
part I do not know how to do.
This only needs to run on Linux/Unix system.