03-28-2013
Need a REGEX to increment the file number of a pdf file
Hello,
I have a few thousand .pdf files in various folders each have a naming scheme like this:
006_-_Titled_Document_#34_-_September-25-2011-side-1.pdf
In each folder, the number system starts at 001 (as you see on the far left of the file name), and then ends at 999 (maximum .pdf files).
Somewhere in the collection of files say .pdf # 286, I have 286 twice (duplicate). Which screws up my numbering system.
I need a REGEX that I can enter into the shell when I'm in the .pdf directory, and start from say the duplicate # 286 and increment that 2nd duplicate # 286 & all the numbers after that by +1. So that they are all renamed appropriately.
This way I don't have to go in there and rename each .pdf file manually one by one.
Unfortunately, I am not very good with REGEX and haven't had much need for it in the past until now.
Would anyone know the best way to automate this .pdf renumbering task? I would appreciate any constructive thoughts on how to accomplish this.
Thank you.
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
In my folder Testing I have 5 files.
1.ps
2.ps
3.ps
4.ps
5.ps
Now When I am converting this .ps file to .pdf file then it is broken at the 2.ps file.
And I created one status.txt file where this broken file 2.ps is stored.
Now How shell I start to convert .ps file to .pdf file from... (5 Replies)
Discussion started by: sunitachoudhury
5 Replies
2. Shell Programming and Scripting
Hello,
Can anyone please help me providing script to get the number of pages in a PDF file?
TIA
Prvn (8 Replies)
Discussion started by: prvnrk
8 Replies
3. UNIX for Dummies Questions & Answers
Hi,
We have an app specific legacy environment running SCO Openserver 5.0.7. I need to be able to (1) scan a pre-existing “form” consisting of logo/boxes/lines/static text as an image , (2) lay a print file from the app "on top of the image" and (3) output the "merge" as a PDF file.
Scanning... (1 Reply)
Discussion started by: 65bit
1 Replies
4. Solaris
Hi,
My requirement is that i have to convenrt a csv file inyo a pdf file . So is there any command which will do that ???
thanks Sambuddha (2 Replies)
Discussion started by: Sambuddha
2 Replies
5. UNIX for Dummies Questions & Answers
I have a file of protein sequences with headers (my source file). Based on a list of IDs (which are included in some of the headers), I'd like to print out only the specified sequences, with only the ID as header.
In other words, I'd like to search source.txt for the terms in IDs.txt, and print... (3 Replies)
Discussion started by: pathunkathunk
3 Replies
6. Shell Programming and Scripting
Hello,
I have an Excel spreadsheet with the following data:
Refntns3_1 char 30 Ref H77 nt codon 1 Reference H77 Nucleotide Codon 1 --
Codns3_1 char 30 Obs Nucleotides codon 1 Observed Nucleotides Codon 1 ... (2 Replies)
Discussion started by: deneuve01
2 Replies
7. Shell Programming and Scripting
Hi Guys,
I am new to shell programing, I have a csv file which has 50k records and I have got the requirement to increment the value in second column after each 5000 records.
for example below
A,B,C,D //Header
1,1,London,UK
1,1,Manchester,UK
1,1,Glasgow,UK
.
.
.
1,1,Newyork,USA... (7 Replies)
Discussion started by: rizzu1555
7 Replies
8. Shell Programming and Scripting
Hi Guru's,
I am new to shell scripting. I have a unique requirement:
The system generates a single pdf(/tmp/ABC.pdf) file with Invoices for Multiple Customers, the format is something like this:
Page1 >> Customer 1 >>Invoice1 + invoice 2 >> Page1 end
Page2 >> Customer 2 >>Invoice 3 + Invoice 4... (3 Replies)
Discussion started by: DIps
3 Replies
9. Shell Programming and Scripting
Hi All,
Is it possible to convert the excel file to PDF file(Without loosing any format) using unix shell scripting ??? If yes
Kindly help me on the code
Thanks in advance!!! (5 Replies)
Discussion started by: Balasankar
5 Replies
10. Shell Programming and Scripting
Hello.
The task :
Using multiple commands like :
gdisk -l $SOME_DISK >> $SOME_FILEI generate some text file.
For readiness I must insert page break.
When the program is finished I want to convert the final text file to a pdf file.
When finished, I got two files : One text file and One pdf... (1 Reply)
Discussion started by: jcdole
1 Replies
LEARN ABOUT DEBIAN
podofoincrementalupdates
PODOFOINCREMENTALUPDATES(1) podofoincrementalupdates PODOFOINCREMENTALUPDATES(1)
NAME
podofoincrementalupdates - Provides information about incremental updates in PDF files
SYNOPSIS
podofoincrementalupdates [-e N out.pdf] file.pdf
DESCRIPTION
podofoincrementalupdates is one of the command line tools from the PoDoFo library that provide several useful operations to work with PDF
files. It can print information of incremental updates to file.pdf. By default the number of incremental updates will be printed.
OPTIONS
-e N
Extract the Nth update
out.pdf
Output PDF file.
file.pdf
Input PDF file.
SEE ALSO
podofobox(1), podofocountpages(1), podofocrop(1), podofoencrypt(1), podofoimg2pdf(1), podofoimgextract(1), podofoimpose(1), podofomerge(1),
podofopages(1), podofopdfinfo(1), podofotxt2pdf(1), podofotxtextract(1), podofouncompress(1), podofoxmp(1)
AUTHORS
PoDoFo is written by Dominik Seichter <domseichter@web.de> and others.
This manual page was written by Oleksandr Moskalenko <malex@debian.org> for the Debian Project (but may be used by others).
PoDoFo 2010-12-09 PODOFOINCREMENTALUPDATES(1)