Shell script to copy(scp) and rename
<p>I have a folder in my server which contains some PDF files.My problem is, i have to copy to other server and rename it.</p>

<p>Name format is like this "yymmdd_hhmmss_FileNo_PdfNo.pdf"</p>

<pre><code>yymmdd_hhmmss_001_AC1.pdf
yymmdd_hhmmss_001_AC2.pdf
yymmdd_hhmmss_002_AC1.pdf
yymmdd_hhmmss_003_RCY1.pdf
</code></pre>

<p>while copying these files i want to rename each file.
Name format is like this "FileNo_PdfNo_yymmddhhmmss.pdf"</p>

<pre><code>001_AC1_yymmddhhmmss.pdf
001_AC2_yymmddhhmmss.pdf
002_AC1_yymmddhhmmss.pdf
003_RCY1_yymmddhhmmss.pdf
</code></pre>

<p>I want to write a shell script(bash) for this. Please give me some idea or some sample scripts related to this.</p>