Re: script doesn't work (renaming files)
Lars Grobe wrote:
>Hi there,
>
>I have to rename a lot of files containing special
>characters. I've got a script to do that, but it
>doesn't work here (unexpected end of file etc..).
>
>BTW: How do I get a list of files containing some
>special characters (äÄöÖüÜß)? Will the "find" do this
>job?
Yes, if you can type the character in, or cut and paste it into the
command line.
If you can't type the character but know its ASCII value, find the octal value
and use that.
For instance, to find names containing `F', which is ASCII 70 (decimal),
0106 octal:
find . -name \*$'\106'\*
(The stars need backslashes to protect them from shell expansion and bash
translates \ooo to a character if \ooo occurs inside $''.)
--
Oliver Elphick Oliver.Elphick@lfix.co.uk
Isle of Wight http://www.lfix.co.uk/oliver
PGP: 1024R/32B8FAA1: 97 EA 1D 47 72 3F 28 47 6B 7E 39 CC 56 E4 C1 47
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C
========================================
"Bring ye all the tithes into the storehouse, that
there may be meat in mine house, and prove me now
herewith, saith the LORD of hosts, if I will not open
you the windows of heaven, and pour you out a
blessing, that there shall not be room enough to
receive it." Malachi 3:10
Reply to: