Re: [PLUG] rename not working as expected
On Thu, 4 Aug 2016, Michael Rasmussen wrote: > rename .htm .html *.htm > rename .JPG *.jpg Michael, Yep. I had the experssion and files, but not the replacement. Toda, Rich ___ PLUG mailing list PLUG@lists.pdxlinux.org http://lists.pdxlinux.org/mailman/listinfo/plug
Re: [PLUG] rename not working as expected
On Thu, 4 Aug 2016, Rich Shepard wrote: > According to man rename: > > rename .htm .html *.htm > > will fix the extension of your html files. > > So, I expect that > > rename .JPG *.jpg rename .JPG .jpg *.JPG -- Paul Heinlein <> heinl...@madboa.com <> http://www.madboa.com/ ___ PLUG mailing list PLUG@lists.pdxlinux.org http://lists.pdxlinux.org/mailman/listinfo/plug
Re: [PLUG] rename not working as expected
On 08/04/2016 04:35 PM, Rich Shepard wrote: > According to man rename: > > rename .htm .html *.htm > > will fix the extension of your html files. > > So, I expect that > > rename .JPG *.jpg > > will change the extension to lower case. It doesn't: > > rename: not enough arguments > > And, 'rename *.JPG *.jpg' produces the same error message. > > I've done this before and do not see what I'm doing incorrectly this time. > Perhaps it's the heat today but fresh eyeballs might see my syntax error. I used to need to do that, and someone on this list provided this answer: The tricky part in the middle is a Perl substitution with regular expressions, highlighted below: rename -v ’s/\.htm$/\.html/’ *.htm Tip: There is an intro to Perl regular expressions here. Basically the "s" means substitute. The syntax is s/old/new/ — substitute the old with the new. A . (period) has a special meaning in a regular expression — it means "match any character". We don't want to match any character in the example above. It should match only a period. The backslash is a way to "escape" the regular expression meaning of "any character" and just read it as a normal period. -- Regards, Dick Steffens ___ PLUG mailing list PLUG@lists.pdxlinux.org http://lists.pdxlinux.org/mailman/listinfo/plug
Re: [PLUG] rename not working as expected
On Thu, Aug 04, 2016 at 04:35:41PM -0700, Rich Shepard wrote: >According to man rename: > > rename .htm .html *.htm > > will fix the extension of your html files. > >So, I expect that > > rename .JPG *.jpg > > will change the extension to lower case. It doesn't: > > rename: not enough arguments > > And, 'rename *.JPG *.jpg' produces the same error message. > >I've done this before and do not see what I'm doing incorrectly this time. > Perhaps it's the heat today but fresh eyeballs might see my syntax error. Perhaps a little alignment will help your eyes: > rename .htm .html *.htm > rename .JPG *.jpg -- Michael Rasmussen, Portland Oregon Be Appropriate && Follow Your Curiosity YOU ARE IN A MAZE OF TWISTY LITTLE PASSAGES, ALL DIFFERENT. ___ PLUG mailing list PLUG@lists.pdxlinux.org http://lists.pdxlinux.org/mailman/listinfo/plug
[PLUG] rename not working as expected
According to man rename: rename .htm .html *.htm will fix the extension of your html files. So, I expect that rename .JPG *.jpg will change the extension to lower case. It doesn't: rename: not enough arguments And, 'rename *.JPG *.jpg' produces the same error message. I've done this before and do not see what I'm doing incorrectly this time. Perhaps it's the heat today but fresh eyeballs might see my syntax error. Rich ___ PLUG mailing list PLUG@lists.pdxlinux.org http://lists.pdxlinux.org/mailman/listinfo/plug