Removing prefix from multiple files and renaming file extension

Hello

i have the files in this format

pdb1i0t.ent
pdb1lv7.ent
pdb1pp6.ent
pdb1tj2.ent
pdb1xg2.ent
pdb2b4b.ent
pdb2ewe.ent

Now i have to remove the prefix pdb from all the files and also i need to change the extension of .ent to .txt

The new file should look like this

1iot.txt
1lv7.txt
1pp6.txt

Thankyou for considering my request

sed 's/^pdb//g;s/.ent/.txt/g' <input-file>

for file in `ls pdb*.ent`
do
   new_name=`echo $file | sed 's/^pdb//;s/.ent/.txt/'`
   mv $file $new_name
done

Hi rakesh

The script is working for small set of data as i have around 150000 entries, it is saying "argument list too long"