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

On Wed, 24 Dec 2003 17:30:45 +0200, Aaron <[EMAIL PROTECTED]> wrote:
>
> has in it files 345.ly, 355.ly etc etc.
>
> I want to make the file name from
> from these lines in the file below (and all files in the directory)
> e8 g8 |
> b4 b8. b16 b8. a16 |
> b4 a4 a8 e8 |
> ---------------------------------------------
> so that the name will become: e8g8b4b8.b16b8.a16b4a4a8e8.ly
> ----------------------------------------------

You can use the tr command to get what you want:

#! /bin/sh -ex
for FL in [1-9]*ly
do
    NNM=`tr -d " |\012" < $FL`     # drop all unwanted chars
    mv $FL ${NNM}.ly
done
########## end of script ##########

Ehud.


- --
 Ehud Karni           Tel: +972-3-7966-561  /"\
 Mivtach - Simon      Fax: +972-3-7966-667  \ /  ASCII Ribbon Campaign
 Insurance agencies   (USA) voice mail and   X   Against   HTML   Mail
 http://www.mvs.co.il  FAX:  1-815-5509341  / \
 GnuPG: 98EA398D <http://www.keyserver.net/>    Better Safe Than Sorry
-----BEGIN PGP SIGNATURE-----
Comment: use http://www.keyserver.net/ to get my key (and others)

iD8DBQE/6ynlLFvTvpjqOY0RAnWUAJ9fUK+66/xGfq1Alpqk8rxB9mfw0QCeOrVY
kNFi8Z4vyX3BaDIszIaE2qU=
=J4Kq
-----END PGP SIGNATURE-----

=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]

Reply via email to