Re: [OT] Changing the case of filenames

From: Rahul Sundaram (sundaram_at_redhat.com)
Date: 04/29/05

  • Next message: FS: "Re: Help with login problem!"
    Date: Fri, 29 Apr 2005 19:23:01 +0530
    To: For users of Fedora Core releases <fedora-list@redhat.com>
    
    

    David Niemi wrote:

    >I am running a fortran program which requires all input file names to be
    >uppercase. As things were originally done in Windo$e all the filenames
    >are mixed case (with numbers).
    >
    >Searching around I came across the "tr" command, but my difficulty comes
    >in trying to use this from the command line (or even in a bash script).
    >
    > mv * | tr [a-z] [A-Z]
    >
    >Does not work as mv requires a directory for the objective with multiple
    >files. All of the scripts that I have seen are mainly for changing the
    >case of text in a text file so wouldn't work for me.
    >
    >So, how would I do this?
    >
    >TIA Dave
    >
    >
    >
     for i in [A-Z]*
     do
            j=`echo $i | tr '[A-Z]' '[a-z]'`
            mv $i $j
     done

    regards
    Rahul

    -- 
    fedora-list mailing list
    fedora-list@redhat.com
    To unsubscribe: http://www.redhat.com/mailman/listinfo/fedora-list
    

  • Next message: FS: "Re: Help with login problem!"

    Relevant Pages

    • [OT] Changing the case of filenames
      ... uppercase. ... As things were originally done in Windo$e all the filenames ... Searching around I came across the "tr" command, ... in trying to use this from the command line (or even in a bash script). ...
      (Fedora)
    • Re: [OT] Changing the case of filenames
      ... >uppercase. ... As things were originally done in Windo$e all the filenames ... >in trying to use this from the command line (or even in a bash script). ...
      (Fedora)
    • Re: [OT] Changing the case of filenames
      ... =>in trying to use this from the command line (or even in a bash script). ... Time flies like the wind. ... Stranger things have .0. ...
      (Fedora)
    • Re: Sending mail to SMTP from command line
      ... >bash script) to a remote SMTP server??? ... >I would do from mozilla thunderbird, but from the command line. ... mutt is a console email client, it's pretty good, but no built ... George Georgalis, systems architect, administrator < ...
      (freebsd-isp)
    • Re: bash: any way to reuse the last output?
      ... syntax that included the front end command e.g.: ... where "saveit" is your perl, tcl, or bash script. ...
      (Fedora)