View Single Post
  #5 (permalink)  
Old 25-Jun-2009, 10:34
oldcpu's Avatar
oldcpu oldcpu is online now
Global Moderator
 
Join Date: Mar 2008
Location: Europe
Posts: 10,752
oldcpu is rated a glorious beacon of lightoldcpu is rated a glorious beacon of lightoldcpu is rated a glorious beacon of lightoldcpu is rated a glorious beacon of lightoldcpu is rated a glorious beacon of lightoldcpu is rated a glorious beacon of lightoldcpu is rated a glorious beacon of light
Default Re: process multiple files from one command line??

Quote:
Originally Posted by ken_yap View Post
If the shell is bash:

${i/%mts/avi}

will give you the name in $i with the trailing mts changed to avi. The % specifies trailing, without it the first match is used, so you will get a surprise with a name like high-mts.mts.
Thanks ! Works like magic !!

Quote:
Originally Posted by ken_yap View Post
Oh, and enclose $i and that expression in double quotes so that possible spaces in the filename won't wreck your script.
There are no spaces in the raw file names produced by my camcorder, but its still good to know.

Thanks !!
Reply With Quote