[ILUGC] Re: [Help] Looking simple solution for renaming multiple files in shell​

  • From: Baskar Selvaraj <baskar@xxxxxxxxxxxx>
  • To: ilugc@xxxxxxxxxxxxx
  • Date: Sun, 5 Aug 2018 19:13:06 +0530

Original filename:

Mod-01 Lec-22(A) One-dimensional compressible flows, isentropic flows-
U5kFIoTAyk4.jpg

Expected output filename:

U5kFIoTAyk4.jpg


ls *.jpg | rename 's/.*(.{15})/\1/'

The above command did the job.  The 15 characters includes the full
filename including the extension.


S. Baskar


_____________________________________
ILUGC List: //www.freelists.org/list/ilugc
ILUGC Web: http://ilugc.in/

Other related posts: