Return to BSD News archive
Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!news.ecn.uoknor.edu!feed1.news.erols.com!howland.erols.net!EU.net!usenet2.news.uk.psi.net!uknet!usenet1.news.uk.psi.net!uknet!dispatch.news.demon.net!demon!awfulhak.demon.co.uk!awfulhak.demon.co.uk!awfulhak.demon.co.uk!not-for-mail From: brian@anorak.utell.net (Brian Somers) Newsgroups: comp.infosystems.www.servers.unix,comp.unix.bsd.freebsd.misc,comp.unix.programmer,comp.unix.questions Subject: Re: Help Need a UTIL for Case Sensitive Files. Date: 22 Nov 1996 16:46:16 -0000 Organization: Coverform Ltd. Lines: 30 Sender: brian@awfulhak.demon.co.uk Message-ID: <574lco$3pa@anorak.utell.net> References: <01bbd5d3$54b9d060$86629dcc@big-one> <Pine.GSO.3.95.961119211603.5049F-100000@goodguy> <329395C9.2D13@whowhere.com> Reply-To: brian%anorak.coverform.lan@awfulhak.demon.co.uk NNTP-Posting-Host: anorak.coverform.lan X-NNTP-Posting-Host: awfulhak.demon.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Newsreader: knews 0.9.8 Xref: euryale.cc.adfa.oz.au comp.infosystems.www.servers.unix:22260 comp.unix.bsd.freebsd.misc:31446 comp.unix.programmer:46767 comp.unix.questions:91814 In article <329395C9.2D13@whowhere.com>, Jerry Aguirre <jerry@whowhere.com> writes: : Cal Dunigan wrote: : : Think pipes, not loops! : : How about the following script: : : #!/bin/sh : find . -name '*[A-Z]*' -print | head -10 | sed -e 's/^/mv / : h : s/^mv// : y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ : H : g : s/\n// : p' | sh : : This will do the renames in a single pass. [.....] Except it screws up once directories are involved (as did my posted solution). You need to just lowercase the last component of the path as Keith Rich pointed out. -- Brian <brian%anorak.coverform.lan@awfulhak.demon.co.uk> <http://www.awfulhak.demon.co.uk/> Don't _EVER_ lose your sense of humour.... .