Thanks to everybody who helped. I've got all my files like I want them now.
Robert
[EMAIL PROTECTED] (Oswald Buddenhagen) wrote:
>> On Tue, Mar 21, 2000 at 03:57:14PM +0100, Robert Kasunic wrote:
>> > I'm trying to rename a lot of files. I just want to substitute underlines
>> > with whitespaces. How can I do that?
>>
>> You might use mmv.
>>
>> If your files are: foo_bars
>>
On Tue, Mar 21, 2000 at 03:57:14PM +0100, Robert Kasunic wrote:
> Hi!
>
> I'm trying to rename a lot of files. I just want to substitute underlines
> with whitespaces. How can I do that?
I recently found a package called mvgp which does exactly what you want.
It seems to work quite well. I found
> On Tue, Mar 21, 2000 at 03:57:14PM +0100, Robert Kasunic wrote:
> > Hi!
> >
> > I'm trying to rename a lot of files. I just want to substitute underlines
> > with whitespaces. How can I do that?
>
> You might use mmv.
>
> If your files are: foo_bars
> then use mmv "*_*" '#1\ #2' (qu
On Tue, Mar 21, 2000 at 10:32:54PM +0100, Christian Surchi wrote:
> On Tue, Mar 21, 2000 at 12:34:07PM -0800, brian moore wrote:
>
> > rename 's/_/ /g' *.mp3
>
> rename? :o
Hrrm? Yes.
It comes with perl.
--
Brian Moore | Of course vi is God's editor.
Sysadmin, C/P
On Tue, Mar 21, 2000 at 12:34:07PM -0800, brian moore wrote:
> rename 's/_/ /g' *.mp3
rename? :o
--
| Christian Surchi | www.firenze.linux.it/~csurchi| www. |
| [EMAIL PROTECTED] | [EMAIL PROTECTED] | gnu. |
| FLUG: www.firenze.linux.it | Debian GNU/Linux: w
On Tue, Mar 21, 2000 at 03:57:14PM +0100, Robert Kasunic wrote:
> Hi!
>
> I'm trying to rename a lot of files. I just want to substitute underlines
> with whitespaces. How can I do that?
Given that spaces can interfere with shell parsing, particularly for
loops of the "for foo in $bar; do somethi
On Tue, Mar 21, 2000 at 03:57:14PM +0100, Robert Kasunic wrote:
> Hi!
>
> I'm trying to rename a lot of files. I just want to substitute underlines
> with whitespaces. How can I do that?
rename 's/_/ /g' *.mp3
(or whatever).
--
Brian Moore | Of course vi is God's editor.
On Tue, Mar 21, 2000 at 03:57:14PM +0100, Robert Kasunic wrote:
> Hi!
>
> I'm trying to rename a lot of files. I just want to substitute underlines
> with whitespaces. How can I do that?
You might use mmv.
If your files are: foo_bars
then use mmv "*_*" '#1\ #2' (quotes required)
ht
[EMAIL PROTECTED] (Oswald Buddenhagen) wrote:
>> I'm trying to rename a lot of files. I just want to substitute underlines
>> with whitespaces. How can I do that?
>>
>possibly not the easiest way, but it works:
>
>for i in *; do mv "$i" "${i//_/ }"; done
>
>works only with bash 2.x (probably y
> > > I'm trying to rename a lot of files. I just want to substitute underlines
> > > with whitespaces. How can I do that?
>
> you could try mmv
> for example, if files are: foo_bar
> just do
> mmv "foo*bar" foo\ bar (the quotes are required)
>
this gives you nothing: normal mv would do t
On Tue, Mar 21, 2000 at 04:09:59PM +0100, Oswald Buddenhagen wrote:
> > I'm trying to rename a lot of files. I just want to substitute underlines
> > with whitespaces. How can I do that?
you could try mmv
for example, if files are: foo_bar
just do
mmv "foo*bar" foo\ bar (the quotes are r
> I'm trying to rename a lot of files. I just want to substitute underlines
> with whitespaces. How can I do that?
>
possibly not the easiest way, but it works:
for i in *; do mv "$i" "${i//_/ }"; done
works only with bash 2.x (probably you have one ...).
you also could try mmv, but i don't
Hi!
I'm trying to rename a lot of files. I just want to substitute underlines
with whitespaces. How can I do that?
TIA
Robert
[EMAIL PROTECTED]
PS: Please reply to [EMAIL PROTECTED]
e that is designed for
the job. You use sed to assemble a stream of commands that you pipe
into a shell:
ls foo-*-bar-*.txt | sed 's/\(foo\(.*\)bar-\(.*\)\)/mv \1 blah\2\3;/' | sh
or so. For increased power/obfuscation, you could pipe the output of
find into sed. This enables you to renam
Quoting Arcady Genkin ([EMAIL PROTECTED]):
> What would be the easiest way to rename a bunch of files
>
> foo-[0-9]-bar-[0-9][0-9].txt
>
> into
>
> blah-[0-9]-[0-9][0-9].txt
>
> Note, that all of the files have identical portions `foo-', `-bar-',
> and `.txt' in the filenames. Different are two
Arcady Genkin said:
> What would be the easiest way to rename a bunch of files
>
> foo-[0-9]-bar-[0-9][0-9].txt
>
> into
>
> blah-[0-9]-[0-9][0-9].txt
mmv is the way to go. It's in the mmv package (imagine that...); just
install it (if you haven't already done so) and then
mmv "foo-*-bar-*" b
On Sun, 23 Jan 2000, Arcady Genkin wrote:
>
> What would be the easiest way to rename a bunch of files
>
> foo-[0-9]-bar-[0-9][0-9].txt
>
> into
>
> blah-[0-9]-[0-9][0-9].txt
>
> Note, that all of the files have identical portions `foo-', `-bar-',
> and `.txt' in the filenames. Different are
A quick solution that pops out of my head, but it is pretty stupid,
and certainly not the easiest:
ls -1 > rename;
cat rename;
group-1-member-01.txt
group-1-member-02.txt
group-2-member-01.txt
vi rename; then do the following:
:1,$s/\([a-z]*\)\(-[0-9]-\)\([a-z\-]*\)
On Sun, Jan 23, 2000 at 10:54:42PM -0500, Arcady Genkin wrote:
> What would be the easiest way to rename a bunch of files
>
> foo-[0-9]-bar-[0-9][0-9].txt
>
> into
>
> blah-[0-9]-[0-9][0-9].txt
Try the attached Perl script (just put it in a directory that's in your path
and make it executable).
What would be the easiest way to rename a bunch of files
foo-[0-9]-bar-[0-9][0-9].txt
into
blah-[0-9]-[0-9][0-9].txt
Note, that all of the files have identical portions `foo-', `-bar-',
and `.txt' in the filenames. Different are two numerical parts.
For example:
,
| group-1-member-01.txt
|
21 matches
Mail list logo