Afficher un message
Vieux 19/03/2008, 16h46   #6
pk
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Renaming files with substitution in names

Janis Papanagnou wrote:

> I suppose including awk wouldn't be bad either?
>
> awk -F. -v OFS=. '$3--&&$8--'
>
> ...will change a filename given through stdin as requested.


But when a number becomes < 10, it will use only a single digit in the
resulting file name, which might or might not be what the OP wants.

(my guess is that he would like to preserve alignment, since I see
some "03"s in the file name, but I may of course be wrong).

--
All the commands are tested with bash and GNU tools, so they may use
nonstandard features. I try to mention when something is nonstandard (if
I'm aware of that), but I may miss something. Corrections are welcome.
  Réponse avec citation
 
Page generated in 0,05473 seconds with 9 queries