Page 2 of 2 FirstFirst 12
Results 11 to 14 of 14

Thread: Terminal wildcards

  1. #11
    Join Date
    Nov 2004
    Beans
    560
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Terminal wildcards

    or:
    Code:
    $ rename -n 's/\.txt$/\.html/' *.txt
    to just display what would be changed and
    Code:
    rename -v 's/\.txt$/\.html/' *.txt
    to really do it.

  2. #12
    Join Date
    Jul 2009
    Location
    London
    Beans
    1,480
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: Terminal wildcards

    and yet another way:
    Code:
    rename 's/.txt$/.html/' *.txt
    nice thing about rename is the -n parameter which allows you to preview what your command will do, without actually doing it.

    EDIT: oops bit late -- strange forums lag

  3. #13
    Join Date
    Oct 2009
    Location
    Kerala, India
    Beans
    162
    Distro
    Ubuntu 12.10 Quantal Quetzal

    Re: Terminal wildcards

    getting better... unfortunately rename is not available for my AIX UNIX machine in office....

  4. #14
    Join Date
    Jul 2009
    Location
    London
    Beans
    1,480
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: Terminal wildcards

    Quote Originally Posted by sarin_cv View Post
    getting better... unfortunately rename is not available for my AIX UNIX machine in office....
    its just a short perl script, 30 lines or so, you could copy it across if you wish (and if you have perl of course)

Page 2 of 2 FirstFirst 12

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •