Re: [OT] Changing the case of filenames

From: Matthew Miller (mattdm_at_mattdm.org)
Date: 04/29/05

  • Next message: Terry Polzin: "Re: [OT] Changing the case of filenames"
    Date: Fri, 29 Apr 2005 09:48:36 -0400
    To: For users of Fedora Core releases <fedora-list@redhat.com>
    
    

    On Fri, Apr 29, 2005 at 02:45:05PM +0100, Paul Howarth wrote:
    > You could use a script like this one:
    >
    > #!/bin/sh
    > for f in *
    > do
    > F="`echo $f | tr a-z A-Z`"
    > echo Renaming \"$f\" to \"$F\"
    > mv "$f" "$F"
    > done
    >

    Or more concisely

    for f in *; do mv -v $f $( echo $f | tr a-z A-Z ); done

    (Not that there's anything wrong with the original script.)

    -- 
    Matthew Miller           mattdm@mattdm.org        <http://www.mattdm.org/>
    Boston University Linux      ------>                <http://linux.bu.edu/>
    Current office temperature: 72 degrees Fahrenheit.
    -- 
    fedora-list mailing list
    fedora-list@redhat.com
    To unsubscribe: http://www.redhat.com/mailman/listinfo/fedora-list
    

  • Next message: Terry Polzin: "Re: [OT] Changing the case of filenames"

    Relevant Pages

    • RE: forwarding logs
      ... Same with another script. ... >> You should not need to cange anything in the log script itself. ... >> Reuben D. Budiardja ...
      (RedHat)
    • RE: forwarding logs
      ... Same with another script. ... >> You should not need to cange anything in the log script itself. ... >> Reuben D. Budiardja ...
      (RedHat)
    • brute force ssh login attempts and how to Disrupt them
      ... My head ... and I heard a rhythmic tick-tock coming from ... back, the idiot was gone so apparently, the script gives up ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
      (Debian-User)
    • Re: CD to acc
      ... I m learning python, so thought i should write small py script to ... os.system (cmd) ... Run this script, while you are in the mounted CD ROM dir... ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx with a subject of "unsubscribe". ...
      (Debian-User)
    • RE: export question
      ... environment, but that is what export is supposed to do. ... 'set' command. ... It *is* set in the sub-process created when you run the script. ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
      (Debian-User)