bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: deleting coma in a large number of files


From: Eric Blake
Subject: Re: deleting coma in a large number of files
Date: Sat, 21 Jul 2007 16:16:27 -0600
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.5) Gecko/20070716 Thunderbird/2.0.0.5 Mnenhy/0.7.5.666

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Timothee on 7/20/2007 12:22 PM:
> Hello,
> as said in the title, I have suppress all comas in a lot of text files
> located in the same directory, all having the same name but with a different
> number at the end (year1, year2, year3, ...).

You weren't clear whether the commas you wanted to remove were inside the
files' contents (in which case, the Bob's answer of using sed is better),
or in the file names.  If the latter, then a mass renaming can be done as
follows:

for f in *,; do mv $f ${f%%,}; done

- --
Don't work too hard, make some time for fun as well!

Eric Blake             ebb9@byu.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGooW784KuGfSFAYARApisAKCZE6tmeQuI3f6mvASRSDJ/DKBR2QCgnE/3
9hnQucJ2AIW5A2/yHEv+4ew=
=JArZ
-----END PGP SIGNATURE-----




reply via email to

[Prev in Thread] Current Thread [Next in Thread]