Note that there are some explanatory texts on larger screens.

plurals
  1. POFind & replace a character in filenames from terminal
    primarykey
    data
    text
    <p>I am trying to use ren-regexp to replace a character in filenames like so:</p> <pre><code>./ren-regexp.pl "s/_/-/g" *.jpg </code></pre> <p>Which I think should replace _ with - in filenames that are jpgs, but what I get is:</p> <pre><code>./ren-regexp.pl: line 4: syntax error near unexpected token `newline' ./ren-regexp.pl: line 4: `&lt;!DOCTYPE html&gt;' </code></pre> <p>I also tried</p> <pre><code>perl ren-regexp.pl "s/_/-/g" *.jpg </code></pre> <p>Which resulted in lots of errors such as:</p> <pre><code>Bareword found where operator expected at ren-regexp.pl line 252, near "time class" (Do you need to predeclare time?) Bareword found where operator expected at ren-regexp.pl line 252, near ""js-relative-date" datetime" (Missing operator before datetime?) Bareword found where operator expected at ren-regexp.pl line 252, near ""2011-04-13T16:40:41-07:00" title" (Missing operator before title?) Number found where operator expected at ren-regexp.pl line 252, near "April 13" (Do you need to predeclare April?) Bareword found where operator expected at ren-regexp.pl line 262, near ""/msabramo/ren-regexp/tree/17026c762c41e2b88ed91bf78b63e54859b706e5" class" (Missing operator before class?) </code></pre> <p>I tried using the examples shown on the GitHub page as well as here:</p> <p><a href="https://stackoverflow.com/questions/5630310/mass-replace-characters-in-filenames-from-terminal/5630338#5630338">Mass replace characters in filenames from terminal?</a></p> <p>Where am I going wrong? Running just 'perl ren-regexp.pl' by itself also results in the above set of errors.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload