[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [shell-script] Multi rename
From: |
Gustavo Jantsch |
Subject: |
Re: [shell-script] Multi rename |
Date: |
Fri, 4 Jul 2003 18:01:37 -0300 |
Utilizo o rename que vem no Slackware pacote... não sei! :)
Mas é um executável, e não um script perl. Vai abaixo o teste
que fiz aqui e a man page dele pra dar uma pista pra vocês!
Falou
Gustavo.
gustavo@ws-d7-0019:~/tmp$ ls -al
total 20
drwxr-xr-x 2 gustavo users 4096 Jul 4 17:59 ./
drwx--x--x 37 gustavo users 4096 Jul 4 17:55 ../
-rw-r--r-- 1 gustavo users 1 Jul 4 17:59 ABC_1.a
-rw-r--r-- 1 gustavo users 1 Jul 4 17:59 ABC_2.a
-rw-r--r-- 1 gustavo users 1 Jul 4 17:59 ABC_3.a
gustavo@ws-d7-0019:~/tmp$ rename ABC XYZ ABC*
gustavo@ws-d7-0019:~/tmp$ ls -al
total 20
drwxr-xr-x 2 gustavo users 4096 Jul 4 17:59 ./
drwx--x--x 37 gustavo users 4096 Jul 4 17:55 ../
-rw-r--r-- 1 gustavo users 1 Jul 4 17:59 XYZ_1.a
-rw-r--r-- 1 gustavo users 1 Jul 4 17:59 XYZ_2.a
-rw-r--r-- 1 gustavo users 1 Jul 4 17:59 XYZ_3.a
NAME
rename - Rename files
SYNOPSIS
rename from to file...
DESCRIPTION
rename will rename the specified files by replacing the
first occurrence of from in their name by to.
For example, given the files foo1, ..., foo9, foo10, ...,
foo278, the commands
rename foo foo0 foo?
rename foo foo0 foo??
will turn them into foo001, ..., foo009, foo010, ...,
foo278.
And
rename .htm .html *.htm
lines 1-25